MLIR  16.0.0git
Public Member Functions | Protected Member Functions | List of all members
mlir::DialectExtension< DerivedT, DialectsT > Class Template Referenceabstract

This class represents a dialect extension anchored on the given set of dialects. More...

#include "mlir/IR/DialectRegistry.h"

+ Inheritance diagram for mlir::DialectExtension< DerivedT, DialectsT >:
+ Collaboration diagram for mlir::DialectExtension< DerivedT, DialectsT >:

Public Member Functions

virtual void apply (MLIRContext *context, DialectsT *...dialects) const =0
 Applies this extension to the given context and set of required dialects. More...
 
std::unique_ptr< DialectExtensionBaseclone () const final
 Return a copy of this extension. More...
 
- Public Member Functions inherited from mlir::DialectExtensionBase
virtual ~DialectExtensionBase ()
 
ArrayRef< StringRef > getRequiredDialects () const
 Return the dialects that our required by this extension to be loaded before applying. More...
 

Protected Member Functions

 DialectExtension ()
 
void apply (MLIRContext *context, MutableArrayRef< Dialect *> dialects) const final
 Override the base apply method to allow providing the exact dialect types. More...
 
- Protected Member Functions inherited from mlir::DialectExtensionBase
 DialectExtensionBase (ArrayRef< StringRef > dialectNames)
 Initialize the extension with a set of required dialects. More...
 

Detailed Description

template<typename DerivedT, typename... DialectsT>
class mlir::DialectExtension< DerivedT, DialectsT >

This class represents a dialect extension anchored on the given set of dialects.

When all of the specified dialects have been loaded, the application function of this extension will be executed.

Definition at line 72 of file DialectRegistry.h.

Constructor & Destructor Documentation

◆ DialectExtension()

template<typename DerivedT, typename... DialectsT>
mlir::DialectExtension< DerivedT, DialectsT >::DialectExtension ( )
inlineprotected

Definition at line 83 of file DialectRegistry.h.

Member Function Documentation

◆ apply() [1/2]

template<typename DerivedT, typename... DialectsT>
virtual void mlir::DialectExtension< DerivedT, DialectsT >::apply ( MLIRContext context,
DialectsT *...  dialects 
) const
pure virtual

Applies this extension to the given context and set of required dialects.

◆ apply() [2/2]

template<typename DerivedT, typename... DialectsT>
void mlir::DialectExtension< DerivedT, DialectsT >::apply ( MLIRContext context,
MutableArrayRef< Dialect *>  dialects 
) const
inlinefinalprotectedvirtual

Override the base apply method to allow providing the exact dialect types.

Implements mlir::DialectExtensionBase.

Definition at line 88 of file DialectRegistry.h.

◆ clone()

template<typename DerivedT, typename... DialectsT>
std::unique_ptr<DialectExtensionBase> mlir::DialectExtension< DerivedT, DialectsT >::clone ( ) const
inlinefinalvirtual

Return a copy of this extension.

Implements mlir::DialectExtensionBase.

Definition at line 78 of file DialectRegistry.h.


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