19 #include "llvm/IR/DebugProgramInstruction.h"
20 #include "llvm/IR/LLVMContext.h"
21 #include "llvm/IR/Module.h"
30 "mlir-to-llvmir",
"Translate MLIR to LLVMIR",
32 llvm::LLVMContext llvmContext;
40 llvm::ScopedDbgInfoFormatSetter formatSetter(*llvmModule,
43 llvmModule->removeDebugIntrinsicDeclarations();
44 llvmModule->print(output,
nullptr);
48 registry.insert<DLTIDialect, func::FuncDialect>();
llvm::cl::opt< bool > WriteNewDbgInfoFormat
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...