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->print(output,
nullptr);
38 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()
LogicalResult failure(bool isFailure=true)
Utility function to generate a LogicalResult.
LogicalResult success(bool isSuccess=true)
Utility function to generate a LogicalResult.
static void registerAllToLLVMIRTranslations(DialectRegistry ®istry)
Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces...
std::unique_ptr< llvm::Module > translateModuleToLLVMIR(Operation *module, llvm::LLVMContext &llvmContext, llvm::StringRef name="LLVMDialectModule")
Translate operation that satisfies LLVM dialect module requirements into an LLVM IR module living in ...