Lines Matching refs:llvm
30 using llvm::Function;
31 using llvm::Module;
140 llvm::FunctionType* getFusedFuncType(bcc::BCCContext& Context, in getFusedFuncType()
155 llvm::SmallVector<llvm::Type*, 8> ArgTys; in getFusedFuncType()
161 llvm::Type* I32Ty = llvm::IntegerType::get(Context.getLLVMContext(), 32); in getFusedFuncType()
176 llvm::Type* retTy = lastF->getReturnType(); in getFusedFuncType()
178 return llvm::FunctionType::get(retTy, ArgTys, false); in getFusedFuncType()
192 llvm::FunctionType* fusedType = in fuseKernels()
202 llvm::LLVMContext& ctxt = Context.getLLVMContext(); in fuseKernels()
204 llvm::BasicBlock* block = llvm::BasicBlock::Create(ctxt, "entry", fusedKernel); in fuseKernels()
205 llvm::IRBuilder<> builder(block); in fuseKernels()
209 llvm::Value* dataElement = nullptr; in fuseKernels()
215 llvm::Value* X = nullptr; in fuseKernels()
221 llvm::Value* Y = nullptr; in fuseKernels()
227 llvm::Value* Z = nullptr; in fuseKernels()
252 std::vector<llvm::Value*> args; in fuseKernels()
261 const llvm::FunctionType* funcTy = inputFunction->getFunctionType(); in fuseKernels()
262 llvm::Type* firstArgType = funcTy->getParamType(0); in fuseKernels()
266 llvm::raw_string_ostream rso(msg); in fuseKernels()
298 dataElement = builder.CreateCall((llvm::Value*)inputFunction, args); in fuseKernels()
309 llvm::NamedMDNode* ExportForEachNameMD = in fuseKernels()
312 llvm::MDString* nameMDStr = llvm::MDString::get(ctxt, fusedName); in fuseKernels()
313 llvm::MDNode* nameMDNode = llvm::MDNode::get(ctxt, nameMDStr); in fuseKernels()
316 llvm::NamedMDNode* ExportForEachMD = in fuseKernels()
318 llvm::MDString* sigMDStr = llvm::MDString::get(ctxt, in fuseKernels()
319 llvm::utostr_32(fusedFunctionSignature)); in fuseKernels()
320 llvm::MDNode* sigMDNode = llvm::MDNode::get(ctxt, sigMDStr); in fuseKernels()
328 const llvm::Function* F = getInvokeFunction(*source, slot, module); in renameInvoke()
329 std::vector<llvm::Type*> params; in renameInvoke()
333 llvm::Type* returnTy = F->getReturnType(); in renameInvoke()
335 llvm::FunctionType* batchFuncTy = in renameInvoke()
336 llvm::FunctionType::get(returnTy, params, false); in renameInvoke()
338 llvm::Function* newF = in renameInvoke()
339 llvm::Function::Create(batchFuncTy, in renameInvoke()
340 llvm::GlobalValue::ExternalLinkage, newName, in renameInvoke()
343 llvm::BasicBlock* block = llvm::BasicBlock::Create(Context.getLLVMContext(), in renameInvoke()
345 llvm::IRBuilder<> builder(block); in renameInvoke()
347 llvm::Function::arg_iterator argIter = newF->arg_begin(); in renameInvoke()
348 llvm::Value* arg1 = argIter++; in renameInvoke()
349 builder.CreateCall((llvm::Value*)F, arg1); in renameInvoke()
353 llvm::NamedMDNode* ExportFuncNameMD = in renameInvoke()
355 llvm::MDString* strMD = llvm::MDString::get(module->getContext(), newName); in renameInvoke()
356 llvm::MDNode* nodeMD = llvm::MDNode::get(module->getContext(), strMD); in renameInvoke()