MLIR 22.0.0git
mlir::ConvertToLLVMPatternInterface Class Referenceabstract

Base class for dialect interfaces providing translation to LLVM IR. More...

#include "mlir/Conversion/ConvertToLLVM/ToLLVMInterface.h"

Inheritance diagram for mlir::ConvertToLLVMPatternInterface:

Public Member Functions

 ConvertToLLVMPatternInterface (Dialect *dialect)
virtual void loadDependentDialects (MLIRContext *context) const
 Hook for derived dialect interface to load the dialects they target.
virtual void populateConvertToLLVMConversionPatterns (ConversionTarget &target, LLVMTypeConverter &typeConverter, RewritePatternSet &patterns) const =0
 Hook for derived dialect interface to provide conversion patterns and mark dialect legal for the conversion target.
Public Member Functions inherited from mlir::DialectInterface
virtual ~DialectInterface ()
DialectgetDialect () const
 Return the dialect that this interface represents.
MLIRContextgetContext () const
 Return the context that holds the parent dialect of this interface.
TypeID getID () const
 Return the derived interface id.

Additional Inherited Members

Public Types inherited from mlir::detail::DialectInterfaceBase< ConcreteType, DialectInterface >
using Base
Public Types inherited from mlir::DialectInterface
template<typename ConcreteType>
using Base = detail::DialectInterfaceBase<ConcreteType, DialectInterface>
 The base class used for all derived interface types.
Static Public Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, DialectInterface >
static TypeID getInterfaceID ()
 Get a unique id for the derived interface type.
Protected Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, DialectInterface >
 DialectInterfaceBase (Dialect *dialect)
Protected Member Functions inherited from mlir::DialectInterface
 DialectInterface (Dialect *dialect, TypeID id)

Detailed Description

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 30 of file ToLLVMInterface.h.

Constructor & Destructor Documentation

◆ ConvertToLLVMPatternInterface()

mlir::ConvertToLLVMPatternInterface::ConvertToLLVMPatternInterface ( Dialect * dialect)
inline

Definition at line 33 of file ToLLVMInterface.h.

Member Function Documentation

◆ loadDependentDialects()

virtual void mlir::ConvertToLLVMPatternInterface::loadDependentDialects ( MLIRContext * context) const
inlinevirtual

Hook for derived dialect interface to load the dialects they target.

The LLVMDialect is implicitly already loaded, but this method allows to load other intermediate dialects used in the conversion, or target dialects like NVVM for example.

Definition at line 39 of file ToLLVMInterface.h.

◆ populateConvertToLLVMConversionPatterns()

virtual void mlir::ConvertToLLVMPatternInterface::populateConvertToLLVMConversionPatterns ( ConversionTarget & target,
LLVMTypeConverter & typeConverter,
RewritePatternSet & patterns ) const
pure virtual

Hook for derived dialect interface to provide conversion patterns and mark dialect legal for the conversion target.

References mlir::patterns, and target.


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