diff options
author | Ruiling Song <ruiling.song@intel.com> | 2015-11-20 15:48:47 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2015-11-20 17:01:19 +0800 |
commit | e5aceb38782e076d61cd4fed4f363aace614dc47 (patch) | |
tree | c1c47c6320bf2218bf53109ef7d2a5cc0a542242 | |
parent | 4c96950745270afc29b1981ec451bd800c173d2a (diff) |
GBE: CreateCall2 is removed in llvm 3.7.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
-rw-r--r-- | backend/src/llvm/llvm_profiling.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/src/llvm/llvm_profiling.cpp b/backend/src/llvm/llvm_profiling.cpp index 8c9157c3..211aa434 100644 --- a/backend/src/llvm/llvm_profiling.cpp +++ b/backend/src/llvm/llvm_profiling.cpp @@ -177,12 +177,13 @@ namespace gbe builder->SetInsertPoint(instI); /* Add the timestamp store function call. */ // __gen_ocl_store_timestamp(int nth, int type); - builder->CreateCall2(cast<llvm::Function>(module->getOrInsertFunction( + Value *Args[2] = {ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)}; + builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( "__gen_ocl_calc_timestamp", Type::getVoidTy(module->getContext()), IntegerType::getInt32Ty(module->getContext()), IntegerType::getInt32Ty(module->getContext()), NULL)), - /* the args */ ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)); + ArrayRef<Value*>(Args)); } /* We insert one store_profiling at the end of the last block to hold the place. */ llvm::Function::iterator BE = F.end(); @@ -190,12 +191,14 @@ namespace gbe BasicBlock::iterator retInst = BE->end(); retInst--; builder->SetInsertPoint(retInst); - builder->CreateCall2(cast<llvm::Function>(module->getOrInsertFunction( + Value *Args2[2] = {profilingBuf, ConstantInt::get(intTy, profilingType)}; + + builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( "__gen_ocl_store_profiling", Type::getVoidTy(module->getContext()), ptrTy, IntegerType::getInt32Ty(module->getContext()), NULL)), - /* the args */profilingBuf, ConstantInt::get(intTy, profilingType)); + ArrayRef<Value*>(Args2)); delete builder; return changed; |