MLIR
18.0.0git
|
Base class for dialect interfaces used to import LLVM IR. More...
#include "mlir/Target/LLVMIR/LLVMImportInterface.h"
Public Member Functions | |
LLVMImportDialectInterface (Dialect *dialect) | |
virtual LogicalResult | convertIntrinsic (OpBuilder &builder, llvm::CallInst *inst, LLVM::ModuleImport &moduleImport) const |
Hook for derived dialect interfaces to implement the import of intrinsics into MLIR. More... | |
virtual LogicalResult | setMetadataAttrs (OpBuilder &builder, unsigned kind, llvm::MDNode *node, Operation *op, LLVM::ModuleImport &moduleImport) const |
Hook for derived dialect interfaces to implement the import of metadata into MLIR. More... | |
virtual ArrayRef< unsigned > | getSupportedIntrinsics () const |
Hook for derived dialect interfaces to publish the supported intrinsics. More... | |
virtual ArrayRef< unsigned > | getSupportedMetadata () const |
Hook for derived dialect interfaces to publish the supported metadata kinds. 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 used to import LLVM IR.
Dialects that can be imported should provide an implementation of this interface for the supported intrinsics. 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 42 of file LLVMImportInterface.h.
|
inline |
Definition at line 45 of file LLVMImportInterface.h.
|
inlinevirtual |
Hook for derived dialect interfaces to implement the import of intrinsics into MLIR.
Definition at line 50 of file LLVMImportInterface.h.
References mlir::failure().
Referenced by mlir::LLVMImportInterface::convertIntrinsic().
|
inlinevirtual |
Hook for derived dialect interfaces to publish the supported intrinsics.
As every LLVM IR intrinsic has a unique integer identifier, the function returns the list of supported intrinsic identifiers.
Definition at line 67 of file LLVMImportInterface.h.
Referenced by mlir::LLVMImportInterface::initializeImport().
|
inlinevirtual |
Hook for derived dialect interfaces to publish the supported metadata kinds.
As every metadata kind has a unique integer identifier, the function returns the list of supported metadata identifiers.
Definition at line 72 of file LLVMImportInterface.h.
|
inlinevirtual |
Hook for derived dialect interfaces to implement the import of metadata into MLIR.
Attaches the converted metadata kind and node to the provided operation.
Definition at line 59 of file LLVMImportInterface.h.