|
Lines 163-172
namespace gbe
Link Here
|
| 163 |
// __gen_ocl_store_timestamp(int nth, int type); |
163 |
// __gen_ocl_store_timestamp(int nth, int type); |
| 164 |
Value *Args[2] = {ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)}; |
164 |
Value *Args[2] = {ConstantInt::get(intTy, pointNum++), ConstantInt::get(intTy, profilingType)}; |
| 165 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 |
165 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 |
|
|
166 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 |
| 167 |
builder->CreateCall(module->getOrInsertFunction( |
| 168 |
#else |
| 166 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
169 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
|
|
170 |
#endif |
| 167 |
"__gen_ocl_calc_timestamp", Type::getVoidTy(module->getContext()), |
171 |
"__gen_ocl_calc_timestamp", Type::getVoidTy(module->getContext()), |
| 168 |
IntegerType::getInt32Ty(module->getContext()), |
172 |
IntegerType::getInt32Ty(module->getContext()), |
|
|
173 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 |
| 174 |
IntegerType::getInt32Ty(module->getContext())), |
| 175 |
#else |
| 169 |
IntegerType::getInt32Ty(module->getContext()))), |
176 |
IntegerType::getInt32Ty(module->getContext()))), |
|
|
177 |
#endif |
| 170 |
ArrayRef<Value*>(Args)); |
178 |
ArrayRef<Value*>(Args)); |
| 171 |
#else |
179 |
#else |
| 172 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
180 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
|
Lines 185-194
namespace gbe
Link Here
|
| 185 |
Value *Args2[2] = {profilingBuf, ConstantInt::get(intTy, profilingType)}; |
193 |
Value *Args2[2] = {profilingBuf, ConstantInt::get(intTy, profilingType)}; |
| 186 |
|
194 |
|
| 187 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 |
195 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 50 |
|
|
196 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 |
| 197 |
builder->CreateCall(module->getOrInsertFunction( |
| 198 |
#else |
| 188 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
199 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
|
|
200 |
#endif |
| 189 |
"__gen_ocl_store_profiling", Type::getVoidTy(module->getContext()), |
201 |
"__gen_ocl_store_profiling", Type::getVoidTy(module->getContext()), |
| 190 |
ptrTy, |
202 |
ptrTy, |
|
|
203 |
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 90 |
| 204 |
IntegerType::getInt32Ty(module->getContext())), |
| 205 |
#else |
| 191 |
IntegerType::getInt32Ty(module->getContext()))), |
206 |
IntegerType::getInt32Ty(module->getContext()))), |
|
|
207 |
#endif |
| 192 |
ArrayRef<Value*>(Args2)); |
208 |
ArrayRef<Value*>(Args2)); |
| 193 |
#else |
209 |
#else |
| 194 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |
210 |
builder->CreateCall(cast<llvm::Function>(module->getOrInsertFunction( |