MLIR  20.0.0git
Public Member Functions | List of all members
mlir::LLVMTranslationInterface Class Reference

Interface collection for translation to LLVM IR, dispatches to a concrete interface implementation based on the dialect to which the given op belongs. More...

#include "mlir/Target/LLVMIR/LLVMTranslationInterface.h"

+ Inheritance diagram for mlir::LLVMTranslationInterface:

Public Member Functions

virtual LogicalResult convertOperation (Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) const
 Translates the given operation to LLVM IR using the interface implemented by the op's dialect. More...
 
virtual LogicalResult amendOperation (Operation *op, ArrayRef< llvm::Instruction * > instructions, NamedAttribute attribute, LLVM::ModuleTranslation &moduleTranslation) const
 Acts on the given operation using the interface implemented by the dialect of one of the operation's dialect attributes. More...
 
virtual LogicalResult convertParameterAttr (LLVM::LLVMFuncOp function, int argIdx, NamedAttribute attribute, LLVM::ModuleTranslation &moduleTranslation) const
 Acts on the given function operation using the interface implemented by the dialect of one of the function parameter attributes. More...
 
- Public Member Functions inherited from mlir::DialectInterfaceCollection< LLVMTranslationDialectInterface >
 DialectInterfaceCollection (MLIRContext *ctx)
 Collect the registered dialect interfaces within the provided context. More...
 
const LLVMTranslationDialectInterfacegetInterfaceFor (Object *obj) const
 Get the interface for a given object, or null if one is not registered. More...
 
iterator begin () const
 
iterator end () const
 
- Public Member Functions inherited from mlir::detail::DialectInterfaceCollectionBase
 DialectInterfaceCollectionBase (MLIRContext *ctx, TypeID interfaceKind, StringRef interfaceName)
 
virtual ~DialectInterfaceCollectionBase ()
 

Additional Inherited Members

- Public Types inherited from mlir::DialectInterfaceCollection< LLVMTranslationDialectInterface >
using Base = DialectInterfaceCollection< LLVMTranslationDialectInterface >
 
using iterator = detail::DialectInterfaceCollectionBase::iterator< LLVMTranslationDialectInterface >
 Iterator access to the held interfaces. More...
 
- Protected Member Functions inherited from mlir::detail::DialectInterfaceCollectionBase
const DialectInterfacegetInterfaceFor (Operation *op) const
 Get the interface for the dialect of given operation, or null if one is not registered. More...
 
const DialectInterfacegetInterfaceFor (Dialect *dialect) const
 Get the interface for the given dialect. More...
 
template<typename InterfaceT >
iterator< InterfaceT > interface_begin () const
 Iterator access to the held interfaces. More...
 
template<typename InterfaceT >
iterator< InterfaceT > interface_end () const
 

Detailed Description

Interface collection for translation to LLVM IR, dispatches to a concrete interface implementation based on the dialect to which the given op belongs.

Definition at line 76 of file LLVMTranslationInterface.h.

Member Function Documentation

◆ amendOperation()

virtual LogicalResult mlir::LLVMTranslationInterface::amendOperation ( Operation op,
ArrayRef< llvm::Instruction * >  instructions,
NamedAttribute  attribute,
LLVM::ModuleTranslation moduleTranslation 
) const
inlinevirtual

Acts on the given operation using the interface implemented by the dialect of one of the operation's dialect attributes.

Definition at line 94 of file LLVMTranslationInterface.h.

References mlir::DialectInterfaceCollection< LLVMTranslationDialectInterface >::getInterfaceFor(), and mlir::NamedAttribute::getNameDialect().

◆ convertOperation()

virtual LogicalResult mlir::LLVMTranslationInterface::convertOperation ( Operation op,
llvm::IRBuilderBase &  builder,
LLVM::ModuleTranslation moduleTranslation 
) const
inlinevirtual

Translates the given operation to LLVM IR using the interface implemented by the op's dialect.

Definition at line 84 of file LLVMTranslationInterface.h.

References mlir::DialectInterfaceCollection< LLVMTranslationDialectInterface >::getInterfaceFor().

◆ convertParameterAttr()

virtual LogicalResult mlir::LLVMTranslationInterface::convertParameterAttr ( LLVM::LLVMFuncOp  function,
int  argIdx,
NamedAttribute  attribute,
LLVM::ModuleTranslation moduleTranslation 
) const
inlinevirtual

Acts on the given function operation using the interface implemented by the dialect of one of the function parameter attributes.

Definition at line 108 of file LLVMTranslationInterface.h.

References mlir::DialectInterfaceCollection< LLVMTranslationDialectInterface >::getInterfaceFor(), mlir::NamedAttribute::getName(), and mlir::NamedAttribute::getNameDialect().


The documentation for this class was generated from the following file: