@@ -104,7 +104,7 @@ isOpenCLKernel(SPIRVFunction *BF) {
104104 return BF->getModule ()->isEntryPoint (ExecutionModelKernel, BF->getId ());
105105}
106106
107- static void
107+ __unused static void
108108dumpLLVM (Module *M, const std::string &FName) {
109109 std::error_code EC;
110110 raw_fd_ostream FS (FName, EC, sys::fs::F_None);
@@ -1956,14 +1956,6 @@ SPIRVToLLVM::postProcessOCL() {
19561956 return true ;
19571957}
19581958
1959- static Value* StripAddrspaceCast (Value *pVal)
1960- {
1961- while (Operator::getOpcode (pVal) == Instruction::AddrSpaceCast)
1962- pVal = cast<Operator>(pVal)->getOperand (0 );
1963-
1964- return pVal;
1965- }
1966-
19671959bool
19681960SPIRVToLLVM::postProcessFunctionsReturnStruct (Function *F) {
19691961
@@ -3697,12 +3689,12 @@ SPIRVToLLVM::transKernelMetadata()
36973689 auto &funcInfo = MD.FuncMD [F];
36983690
36993691 // Generate metadata for initializer
3700- if (auto EM = BF->getExecutionMode (ExecutionModeInitializer)) {
3692+ if (BF->getExecutionMode (ExecutionModeInitializer)) {
37013693 funcInfo.IsInitializer = true ;
37023694 }
37033695
37043696 // Generate metadata for finalizer
3705- if (auto EM = BF->getExecutionMode (ExecutionModeFinalizer)) {
3697+ if (BF->getExecutionMode (ExecutionModeFinalizer)) {
37063698 funcInfo.IsFinalizer = true ;
37073699 }
37083700
@@ -3981,7 +3973,7 @@ SPIRVToLLVM::transCompilerOption() {
39813973 return true ;
39823974}
39833975
3984- static void dumpSPIRVBC (const char * fname, const char * data, unsigned int size)
3976+ __unused static void dumpSPIRVBC (const char * fname, const char * data, unsigned int size)
39853977{
39863978 FILE* fp;
39873979 fp = fopen (fname, " wb" );
0 commit comments