Lines Matching refs:llvm
30 using llvm::Function;
31 using llvm::Module;
133 llvm::FunctionType* getFusedFuncType(bcc::BCCContext& Context, in getFusedFuncType()
148 llvm::SmallVector<llvm::Type*, 8> ArgTys; in getFusedFuncType()
154 llvm::Type* I32Ty = llvm::IntegerType::get(Context.getLLVMContext(), 32); in getFusedFuncType()
169 llvm::Type* retTy = lastF->getReturnType(); in getFusedFuncType()
171 return llvm::FunctionType::get(retTy, ArgTys, false); in getFusedFuncType()
185 llvm::FunctionType* fusedType = in fuseKernels()
195 llvm::LLVMContext& ctxt = Context.getLLVMContext(); in fuseKernels()
197 llvm::BasicBlock* block = llvm::BasicBlock::Create(ctxt, "entry", fusedKernel); in fuseKernels()
198 llvm::IRBuilder<> builder(block); in fuseKernels()
202 llvm::Value* dataElement = nullptr; in fuseKernels()
208 llvm::Value* X = nullptr; in fuseKernels()
214 llvm::Value* Y = nullptr; in fuseKernels()
220 llvm::Value* Z = nullptr; in fuseKernels()
245 std::vector<llvm::Value*> args; in fuseKernels()
254 const llvm::FunctionType* funcTy = inputFunction->getFunctionType(); in fuseKernels()
255 llvm::Type* firstArgType = funcTy->getParamType(0); in fuseKernels()
259 llvm::raw_string_ostream rso(msg); in fuseKernels()
291 dataElement = builder.CreateCall((llvm::Value*)inputFunction, args); in fuseKernels()
302 llvm::NamedMDNode* ExportForEachNameMD = in fuseKernels()
305 llvm::MDString* nameMDStr = llvm::MDString::get(ctxt, fusedName); in fuseKernels()
306 llvm::MDNode* nameMDNode = llvm::MDNode::get(ctxt, nameMDStr); in fuseKernels()
309 llvm::NamedMDNode* ExportForEachMD = in fuseKernels()
311 llvm::MDString* sigMDStr = llvm::MDString::get(ctxt, in fuseKernels()
312 llvm::utostr(fusedFunctionSignature)); in fuseKernels()
313 llvm::MDNode* sigMDNode = llvm::MDNode::get(ctxt, sigMDStr); in fuseKernels()
321 const llvm::Function* F = getInvokeFunction(*source, slot, module); in renameInvoke()
322 std::vector<llvm::Type*> params; in renameInvoke()
326 llvm::Type* returnTy = F->getReturnType(); in renameInvoke()
328 llvm::FunctionType* batchFuncTy = in renameInvoke()
329 llvm::FunctionType::get(returnTy, params, false); in renameInvoke()
331 llvm::Function* newF = in renameInvoke()
332 llvm::Function::Create(batchFuncTy, in renameInvoke()
333 llvm::GlobalValue::ExternalLinkage, newName, in renameInvoke()
336 llvm::BasicBlock* block = llvm::BasicBlock::Create(Context.getLLVMContext(), in renameInvoke()
338 llvm::IRBuilder<> builder(block); in renameInvoke()
340 llvm::Function::arg_iterator argIter = newF->arg_begin(); in renameInvoke()
341 llvm::Value* arg1 = &*(argIter++); in renameInvoke()
342 builder.CreateCall((llvm::Value*)F, arg1); in renameInvoke()
346 llvm::NamedMDNode* ExportFuncNameMD = in renameInvoke()
348 llvm::MDString* strMD = llvm::MDString::get(module->getContext(), newName); in renameInvoke()
349 llvm::MDNode* nodeMD = llvm::MDNode::get(module->getContext(), strMD); in renameInvoke()