13 #ifndef MLIR_TOOLS_MLIRTRANSLATE_TRANSLATION_H 14 #define MLIR_TOOLS_MLIRTRANSLATE_TRANSLATION_H 16 #include "llvm/Support/CommandLine.h" 25 class DialectRegistry;
29 template <
typename OpTy>
44 std::function<OwningOpRef<ModuleOp>(llvm::StringRef,
MLIRContext *)>;
49 std::function<LogicalResult(ModuleOp, llvm::raw_ostream &output)>;
57 llvm::SourceMgr &sourceMgr, llvm::raw_ostream &output,
MLIRContext *)>;
77 const TranslateStringRefToMLIRFunction &
function);
82 llvm::StringRef name,
const TranslateFromMLIRFunction &
function,
96 void printOptionInfo(
const llvm::cl::Option &o,
97 size_t globalWidth)
const override;
102 #endif // MLIR_TOOLS_MLIRTRANSLATE_TRANSLATION_H Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates...
Include the generated interface declarations.
std::function< OwningOpRef< ModuleOp >(llvm::SourceMgr &sourceMgr, MLIRContext *)> TranslateSourceMgrToMLIRFunction
Interface of the function that translates the sources managed by sourceMgr to MLIR.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
std::function< OwningOpRef< ModuleOp >(llvm::StringRef, MLIRContext *)> TranslateStringRefToMLIRFunction
Interface of the function that translates the given string to MLIR.
This class represents an efficient way to signal success or failure.
A command line parser for translation functions.
std::function< LogicalResult(ModuleOp, llvm::raw_ostream &output)> TranslateFromMLIRFunction
Interface of the function that translates MLIR to a different format and outputs the result to a stre...
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
std::function< LogicalResult(llvm::SourceMgr &sourceMgr, llvm::raw_ostream &output, MLIRContext *)> TranslateFunction
Interface of the function that performs file-to-file translation involving MLIR.