MLIR
18.0.0git
|
Base class for dialect interfaces providing translation to LLVM IR. More...
#include "mlir/Target/LLVMIR/LLVMTranslationInterface.h"
Public Member Functions | |
LLVMTranslationDialectInterface (Dialect *dialect) | |
virtual LogicalResult | convertOperation (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) const |
Hook for derived dialect interface to provide translation of the operations to LLVM IR. More... | |
virtual LogicalResult | amendOperation (Operation *op, NamedAttribute attribute, LLVM::ModuleTranslation &moduleTranslation) const |
Hook for derived dialect interface to act on an operation that has dialect attributes from the derived dialect (the operation itself may be from a different dialect). More... | |
Additional Inherited Members | |
![]() | |
using | Base = DialectInterfaceBase< ConcreteType, BaseT > |
![]() | |
static TypeID | getInterfaceID () |
Get a unique id for the derived interface type. More... | |
![]() | |
DialectInterfaceBase (Dialect *dialect) | |
Base class for dialect interfaces providing translation to LLVM IR.
Dialects that can be translated should provide an implementation of this interface for the supported operations. The interface may be implemented in a separate library to avoid the "main" dialect library depending on LLVM IR. The interface can be attached using the delayed registration mechanism available in DialectRegistry.
Definition at line 35 of file LLVMTranslationInterface.h.
|
inline |
Definition at line 38 of file LLVMTranslationInterface.h.
|
inlinevirtual |
Hook for derived dialect interface to act on an operation that has dialect attributes from the derived dialect (the operation itself may be from a different dialect).
This gets called after the operation has been translated. The hook is expected to use moduleTranslation to look up the translation results and amend the corresponding IR constructs. Does nothing and succeeds by default.
Definition at line 55 of file LLVMTranslationInterface.h.
|
inlinevirtual |
Hook for derived dialect interface to provide translation of the operations to LLVM IR.
Definition at line 43 of file LLVMTranslationInterface.h.