18 #include "llvm/IR/DebugProgramInstruction.h"
19 #include "llvm/IR/LLVMContext.h"
20 #include "llvm/IR/Module.h"
27 "mlir-to-llvmir",
"Translate MLIR to LLVMIR",
29 llvm::LLVMContext llvmContext;
34 llvmModule->removeDebugIntrinsicDeclarations();
35 llvmModule->print(output,
nullptr);
39 registry.insert<DLTIDialect, func::FuncDialect>();
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
Operation is the basic unit of execution within MLIR.
Include the generated interface declarations.
void registerToLLVMIRTranslation()
std::unique_ptr< llvm::Module > translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule", bool disableVerification=false)
Translates a given LLVM dialect module into an LLVM IR module living in the given context.
static void registerAllToLLVMIRTranslations(DialectRegistry ®istry)
Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces...