MLIR  20.0.0git
Public Member Functions | List of all members
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. More...
 
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. More...
 

Additional Inherited Members

- Public Types inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >
using Base = DialectInterfaceBase< ConcreteType, BaseT >
 
- Static Public Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >
static TypeID getInterfaceID ()
 Get a unique id for the derived interface type. More...
 
- Protected Member Functions inherited from mlir::detail::DialectInterfaceBase< ConcreteType, BaseT >
 DialectInterfaceBase (Dialect *dialect)
 

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.


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