Home
last modified time | relevance | path

Searched refs:llvmModule (Results 1 – 25 of 33) sorted by relevance

12

/llvm-project/mlir/lib/Target/LLVM/
H A DModuleToObject.cpp211 ModuleToObject::translateToISA(llvm::Module &llvmModule, in run() local
224 codegenPasses.run(llvmModule); in run()
241 ModuleToObject::moduleToObject(llvm::Module &llvmModule) {
245 llvm::WriteBitcodeToFile(llvmModule, outputStream);
252 std::unique_ptr<llvm::Module> llvmModule = translateToLLVMIR(llvmContext);
253 if (!llvmModule) {
257 setDataLayoutAndTriple(*llvmModule);
260 initialLlvmIRCallback(*llvmModule);
263 handleModulePreLink(*llvmModule);
265 auto libs = loadBitcodeFiles(*llvmModule);
170 translateToISA(llvm::Module & llvmModule,llvm::TargetMachine & targetMachine) translateToISA() argument
200 moduleToObject(llvm::Module & llvmModule) moduleToObject() argument
[all...]
/llvm-project/mlir/lib/Target/LLVMIR/
H A DConvertFromLLVMIR.cpp46 std::unique_ptr<llvm::Module> llvmModule = in registerFromLLVMIRTranslation() local
49 if (!llvmModule) { in registerFromLLVMIRTranslation()
56 if (llvm::verifyModule(*llvmModule, &llvm::errs())) in registerFromLLVMIRTranslation()
60 if (llvmModule->IsNewDbgInfoFormat) in registerFromLLVMIRTranslation()
61 llvmModule->convertFromNewDbgValues(); in registerFromLLVMIRTranslation()
63 return translateLLVMIRToModule(std::move(llvmModule), context, in registerFromLLVMIRTranslation()
H A DConvertToLLVMIR.cpp33 auto llvmModule = translateModuleToLLVMIR(op, llvmContext); in registerToLLVMIRTranslation() local
34 if (!llvmModule) in registerToLLVMIRTranslation()
40 llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule, in registerToLLVMIRTranslation()
43 llvmModule->removeDebugIntrinsicDeclarations(); in registerToLLVMIRTranslation()
44 llvmModule->print(output, nullptr); in registerToLLVMIRTranslation()
H A DLoopAnnotationTranslation.h29 llvm::Module &llvmModule) in LoopAnnotationTranslation() argument
30 : moduleTranslation(moduleTranslation), llvmModule(llvmModule) {} in LoopAnnotationTranslation()
67 llvm::Module &llvmModule; variable
H A DModuleTranslation.cpp716 std::unique_ptr<llvm::Module> llvmModule) in getLLVMConstant()
717 : mlirModule(module), llvmModule(std::move(llvmModule)), in getLLVMConstant()
719 std::make_unique<DebugTranslation>(module, *this->llvmModule)),
721 *this, *this->llvmModule)), in ModuleTranslation() argument
722 typeTranslator(this->llvmModule->getContext()), in ModuleTranslation()
1043 llvmModule->getContext(), strAttr.getValue(), /*AddNull=*/false); in convertGlobals()
1063 *llvmModule, type, op.getConstant(), linkage, cst, op.getSymName(), in convertGlobals()
1143 llvm::IRBuilder<> builder(llvmModule->getContext()); in convertGlobals()
1234 appendGlobalFn(*llvmModule, in checkedAddLLVMFnAttribute()
1806 auto llvmModule = std::make_unique<llvm::Module>(name, llvmContext); prepareLLVMModule() local
1845 std::unique_ptr<llvm::Module> llvmModule = translateModuleToLLVMIR() local
[all...]
H A DDebugTranslation.cpp28 DebugTranslation::DebugTranslation(Operation *module, llvm::Module &llvmModule) in DebugTranslation() argument
29 : debugEmissionIsEnabled(false), llvmModule(llvmModule), in DebugTranslation()
30 llvmCtx(llvmModule.getContext()) { in DebugTranslation()
41 if (!llvmModule.getModuleFlag(debugVersionKey)) in DebugTranslation()
42 llvmModule.addModuleFlag(llvm::Module::Warning, debugVersionKey, in DebugTranslation()
52 llvmModule.addModuleFlag(llvm::Module::Warning, "CodeView", 1); in DebugTranslation()
124 llvm::DIBuilder builder(llvmModule); in getDistinctOrUnique()
H A DModuleImport.cpp163 std::unique_ptr<llvm::Module> llvmModule, in ModuleImport()
167 mlirModule(mlirModule), llvmModule(std::move(llvmModule)), in ModuleImport()
243 << diagMD(node, llvmModule.get()); in processTBAAMetadata()
251 << diagMD(node, llvmModule.get()); in processTBAAMetadata()
260 << diagMD(node, llvmModule.get()); in processTBAAMetadata()
316 << diagMD(node, llvmModule.get()); in processTBAAMetadata()
364 << diagMD(current, llvmModule.get()); in processTBAAMetadata()
408 << diagMD(current, llvmModule.get()); in processAccessGroupMetadata()
418 << diagMD(node, llvmModule in processAliasScopeMetadata()
157 ModuleImport(ModuleOp mlirModule,std::unique_ptr<llvm::Module> llvmModule,bool emitExpensiveWarnings,bool importEmptyDICompositeTypes) ModuleImport() argument
2108 translateLLVMIRToModule(std::unique_ptr<llvm::Module> llvmModule,MLIRContext * context,bool emitExpensiveWarnings,bool dropDICompositeTypeElements) translateLLVMIRToModule() argument
[all...]
H A DDebugTranslation.h32 DebugTranslation(Operation *module, llvm::Module &llvmModule);
150 llvm::Module &llvmModule;
142 llvm::Module &llvmModule; global() variable
H A DLoopAnnotationTranslation.cpp272 LoopAnnotationConversion(attr, op, *this, this->llvmModule.getContext()) in translateLoopAnnotation()
285 result->second = llvm::MDNode::getDistinct(llvmModule.getContext(), {}); in getAccessGroup()
300 return llvm::MDNode::get(llvmModule.getContext(), groupMDs); in getAccessGroups()
/llvm-project/mlir/unittests/Target/LLVM/
H A DSerializeToLLVMBitcode.cpp93 llvm::Expected<std::unique_ptr<llvm::Module>> llvmModule =
95 ASSERT_TRUE(!!llvmModule);
96 ASSERT_TRUE(!!*llvmModule);
99 ASSERT_TRUE((*llvmModule)->getFunction("foo") != nullptr);
69 llvm::Expected<std::unique_ptr<llvm::Module>> llvmModule = TEST_F() local
H A DSerializeROCDLTarget.cpp98 llvm::Expected<std::unique_ptr<llvm::Module>> llvmModule = in TEST_F() local
100 ASSERT_TRUE(!!llvmModule); in TEST_F()
101 ASSERT_TRUE(!!*llvmModule); in TEST_F()
104 ASSERT_TRUE((*llvmModule)->getFunction("rocdl_kernel") != nullptr); in TEST_F()
H A DSerializeNVVMTarget.cpp99 llvm::Expected<std::unique_ptr<llvm::Module>> llvmModule = in TEST_F()
101 ASSERT_TRUE(!!llvmModule); in TEST_F()
102 ASSERT_TRUE(!!*llvmModule); in TEST_F()
105 ASSERT_TRUE((*llvmModule)->getFunction("nvvm_kernel") != nullptr);
95 llvm::Expected<std::unique_ptr<llvm::Module>> llvmModule = TEST_F() local
/llvm-project/mlir/test/lib/Dialect/Test/
H A DTestToLLVMIRTranslation.cpp124 auto llvmModule = translateModuleToLLVMIR(op, llvmContext); in registerTestToLLVMIR() local
125 if (!llvmModule) in registerTestToLLVMIR()
131 llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule, in registerTestToLLVMIR()
134 llvmModule->removeDebugIntrinsicDeclarations(); in registerTestToLLVMIR()
135 llvmModule->print(output, nullptr); in registerTestToLLVMIR()
H A DTestFromLLVMIRTranslation.cpp87 std::unique_ptr<llvm::Module> llvmModule = in registerTestFromLLVMIR() local
90 if (!llvmModule) { in registerTestFromLLVMIR()
97 if (llvm::verifyModule(*llvmModule, &llvm::errs())) in registerTestFromLLVMIR()
100 return translateLLVMIRToModule(std::move(llvmModule), context, false); in registerTestFromLLVMIR()
/llvm-project/mlir/test/CAPI/
H A Dtranslation.c46 LLVMModuleRef llvmModule = mlirTranslateModuleToLLVMIR(operation, llvmCtx); in testToLLVMIR() local
54 LLVMDumpModule(llvmModule); in testToLLVMIR()
56 LLVMDisposeModule(llvmModule); in testToLLVMIR()
/llvm-project/mlir/lib/ExecutionEngine/
H A DExecutionEngine.cpp131 void ExecutionEngine::setupTargetTripleAndDataLayout(Module *llvmModule, in setupTargetTripleAndDataLayout() argument
133 llvmModule->setDataLayout(tm->createDataLayout()); in setupTargetTripleAndDataLayout()
134 llvmModule->setTargetTriple(tm->getTargetTriple().getTriple()); in setupTargetTripleAndDataLayout()
248 auto llvmModule = options.llvmModuleBuilder in create() local
251 if (!llvmModule) in create()
272 setupTargetTripleAndDataLayout(llvmModule.get(), tm.get()); in create()
273 packFunctionArguments(llvmModule.get()); in create()
275 auto dataLayout = llvmModule->getDataLayout(); in create()
332 llvm::Triple targetTriple(llvm::Twine(llvmModule->getTargetTriple())); in create()
380 ThreadSafeModule tsm(std::move(llvmModule), st in create()
[all...]
/llvm-project/flang/lib/Frontend/
H A DFrontendActions.cpp251 llvmModule = llvm::parseIRFile(getCurrentInput().getFile(), err, *llvmCtx); in beginSourceFileAction()
252 if (!llvmModule || llvm::verifyModule(*llvmModule, &llvm::errs())) { in beginSourceFileAction()
905 llvmModule = mlir::translateModuleToLLVMIR( in getOutputStream()
908 if (!llvmModule) {
917 llvmModule->setPICLevel(static_cast<llvm::PICLevel::Level>(opts.PICLevel)); in generateMachineCodeOrAssemblyImpl()
919 llvmModule->setPIELevel( in generateMachineCodeOrAssemblyImpl() argument
927 llvmModule->setCodeModel(*cm); in generateMachineCodeOrAssemblyImpl()
930 llvmModule->setLargeDataThreshold(opts.LargeDataThreshold); in generateMachineCodeOrAssemblyImpl()
966 /// \param [in] llvmModule LLV in runOptimizationPipeline()
[all...]
/llvm-project/mlir/examples/toy/Ch6/
H A Dtoyc.cpp219 auto llvmModule = mlir::translateModuleToLLVMIR(module, llvmContext); in dumpLLVMIR()
220 if (!llvmModule) { in dumpLLVMIR()
241 mlir::ExecutionEngine::setupTargetTripleAndDataLayout(llvmModule.get(), in dumpLLVMIR()
248 if (auto err = optPipeline(llvmModule.get())) { in dumpLLVMIR()
252 llvm::errs() << *llvmModule << "\n"; in dumpLLVMIR()
218 auto llvmModule = mlir::translateModuleToLLVMIR(module, llvmContext); dumpLLVMIR() local
/llvm-project/mlir/examples/toy/Ch7/
H A Dtoyc.cpp220 auto llvmModule = mlir::translateModuleToLLVMIR(module, llvmContext); in dumpLLVMIR()
221 if (!llvmModule) { in dumpLLVMIR()
242 mlir::ExecutionEngine::setupTargetTripleAndDataLayout(llvmModule.get(), in dumpLLVMIR()
249 if (auto err = optPipeline(llvmModule.get())) { in dumpLLVMIR()
253 llvm::errs() << *llvmModule << "\n"; in dumpLLVMIR()
219 auto llvmModule = mlir::translateModuleToLLVMIR(module, llvmContext); dumpLLVMIR() local
/llvm-project/mlir/lib/CAPI/Target/
H A DLLVMIR.cpp30 std::unique_ptr<llvm::Module> llvmModule = in mlirTranslateModuleToLLVMIR() local
33 LLVMModuleRef moduleRef = llvm::wrap(llvmModule.release()); in mlirTranslateModuleToLLVMIR()
/llvm-project/mlir/lib/Target/LLVM/ROCDL/
H A DTarget.cpp404 const gpu::TargetOptions &targetOptions, llvm::Module &llvmModule) { in moduleToObjectImpl()
410 << llvmModule << "\n"; in moduleToObjectImpl()
414 return SerializeGPUModuleBase::moduleToObject(llvmModule); in moduleToObjectImpl()
426 translateToISA(llvmModule, **targetMachine); in moduleToObjectImpl()
460 moduleToObject(llvm::Module &llvmModule) override;
474 AMDGPUSerializer::moduleToObject(llvm::Module &llvmModule) {
475 return moduleToObjectImpl(targetOptions, llvmModule); in moduleToObject() argument
405 moduleToObjectImpl(const gpu::TargetOptions & targetOptions,llvm::Module & llvmModule) moduleToObjectImpl() argument
/llvm-project/mlir/include/mlir/Target/LLVM/
H A DModuleToObject.h64 /// Hook for performing additional actions on the llvmModule pre linking.
67 /// Hook for performing additional actions on the llvmModule post linking.
73 moduleToObject(llvm::Module &llvmModule);
94 /// Link the llvmModule to other bitcode file.
104 translateToISA(llvm::Module &llvmModule, llvm::TargetMachine &targetMachine);
/llvm-project/mlir/include/mlir/Target/LLVMIR/
H A DModuleTranslation.h183 llvm::LLVMContext &getLLVMContext() const { return llvmModule->getContext(); } in lookupGlobal()
196 llvm::Module *getLLVMModule() { return llvmModule.get(); }
315 std::unique_ptr<llvm::Module> llvmModule);
356 std::unique_ptr<llvm::Module> llvmModule;
344 std::unique_ptr<llvm::Module> llvmModule; global() variable
/llvm-project/mlir/docs/Tutorials/Toy/
H A DCh-6.md190 std::unique_ptr<llvm::Module> llvmModule = mlir::translateModuleToLLVMIR(module);
191 if (!llvmModule)
257 auto llvmModule = mlir::translateModuleToLLVMIR(module, llvmContext);
258 if (!llvmModule) {
266 mlir::ExecutionEngine::setupTargetTriple(llvmModule.get());
272 if (auto err = optPipeline(llvmModule.get())) {
276 llvm::errs() << *llvmModule << "\n";
/llvm-project/mlir/lib/Target/LLVM/NVVM/
H A DTarget.cpp220 moduleToObject(llvm::Module &llvmModule) override; in getOperation()
619 NVPTXSerializer::moduleToObject(llvm::Module &llvmModule) {
625 llvm::dbgs() << llvmModule << "\n";
630 return SerializeGPUModuleBase::moduleToObject(llvmModule);
647 translateToISA(llvmModule, **targetMachine);
521 moduleToObject(llvm::Module & llvmModule) moduleToObject() argument

12