MLIR 24.0.0git
mlir::OperationName::Impl Class Reference

#include "mlir/IR/OperationSupport.h"

Inheritance diagram for mlir::OperationName::Impl:

Public Member Functions

 Impl (StringRef, Dialect *dialect, TypeID typeID, detail::InterfaceMap interfaceMap)
 Impl (StringAttr name, Dialect *dialect, TypeID typeID, detail::InterfaceMap interfaceMap)
bool isRegistered () const
 Returns true if this is a registered operation.
detail::InterfaceMapgetInterfaceMap ()
DialectgetDialect () const
StringAttr getName () const
TypeID getTypeID () const
TypeID getPropertiesTypeID () const
ArrayRef< StringAttr > getAttributeNames () const
Public Member Functions inherited from mlir::OperationName::InterfaceConcept
virtual ~InterfaceConcept ()=default
virtual LogicalResult foldHook (Operation *, ArrayRef< Attribute >, SmallVectorImpl< OpFoldResult > &)=0
virtual void getCanonicalizationPatterns (RewritePatternSet &, MLIRContext *)=0
virtual bool hasTrait (TypeID)=0
virtual OperationName::ParseAssemblyFn getParseAssemblyFn ()=0
virtual void populateDefaultAttrs (const OperationName &, NamedAttrList &)=0
virtual void printAssembly (Operation *, OpAsmPrinter &, StringRef)=0
virtual LogicalResult verifyInvariants (Operation *)=0
virtual LogicalResult verifyRegionInvariants (Operation *)=0
virtual std::optional< AttributegetInherentAttr (Operation *, StringRef name)=0
 Implementation for properties.
virtual void setInherentAttr (Operation *op, StringAttr name, Attribute value)=0
virtual void walkInherentAttrs (Operation *op, InherentAttrVisitor visitor)=0
virtual LogicalResult verifyInherentAttrs (OperationName opName, NamedAttrList &attributes, function_ref< InFlightDiagnostic()> emitError)=0
virtual int getOpPropertyByteSize ()=0
virtual void initProperties (OperationName opName, PropertyRef storage, PropertyRef init)=0
virtual void deleteProperties (PropertyRef)=0
virtual void populateDefaultProperties (OperationName opName, PropertyRef properties)=0
virtual LogicalResult setPropertiesFromAttr (OperationName, PropertyRef, Attribute, function_ref< InFlightDiagnostic()> emitError)=0
virtual Attribute getPropertiesAsAttr (Operation *)=0
virtual void copyProperties (PropertyRef, PropertyRef)=0
virtual bool compareProperties (PropertyRef, PropertyRef)=0
virtual llvm::hash_code hashProperties (PropertyRef)=0

Protected Attributes

StringAttr name
 The name of the operation.
TypeID typeID
 The unique identifier of the derived Op class.
Dialectdialect
 The following fields are only populated when the operation is registered.
detail::InterfaceMap interfaceMap
 A map of interfaces that were registered to this operation.
ArrayRef< StringAttr > attributeNames
 A list of attribute names registered to this operation in StringAttr form.
TypeID propertiesTypeID
 The TypeID of the Properties struct for this operation.

Friends

class RegisteredOperationName

Detailed Description

Definition at line 161 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ Impl() [1/2]

◆ Impl() [2/2]

mlir::OperationName::Impl::Impl ( StringAttr name,
Dialect * dialect,
TypeID typeID,
detail::InterfaceMap interfaceMap )
inline

Definition at line 165 of file OperationSupport.h.

References dialect, interfaceMap, name, and typeID.

Member Function Documentation

◆ getAttributeNames()

ArrayRef< StringAttr > mlir::OperationName::Impl::getAttributeNames ( ) const
inline

Definition at line 177 of file OperationSupport.h.

References attributeNames.

Referenced by mlir::OperationName::getAttributeNames().

◆ getDialect()

Dialect * mlir::OperationName::Impl::getDialect ( ) const
inline

◆ getInterfaceMap()

◆ getName()

StringAttr mlir::OperationName::Impl::getName ( ) const
inline

Definition at line 174 of file OperationSupport.h.

References name.

Referenced by mlir::OperationName::getDialect(), and mlir::OperationName::getIdentifier().

◆ getPropertiesTypeID()

TypeID mlir::OperationName::Impl::getPropertiesTypeID ( ) const
inline

Definition at line 176 of file OperationSupport.h.

References propertiesTypeID.

Referenced by mlir::OperationName::getOpPropertiesTypeID().

◆ getTypeID()

TypeID mlir::OperationName::Impl::getTypeID ( ) const
inline

◆ isRegistered()

bool mlir::OperationName::Impl::isRegistered ( ) const
inline

◆ RegisteredOperationName

friend class RegisteredOperationName
friend

Definition at line 206 of file OperationSupport.h.

References RegisteredOperationName.

Referenced by RegisteredOperationName.

Member Data Documentation

◆ attributeNames

ArrayRef<StringAttr> mlir::OperationName::Impl::attributeNames
protected

A list of attribute names registered to this operation in StringAttr form.

This allows for operation classes to use StringAttr for attribute lookup/creation/etc., as opposed to raw strings.

Definition at line 201 of file OperationSupport.h.

Referenced by getAttributeNames().

◆ dialect

Dialect* mlir::OperationName::Impl::dialect
protected

The following fields are only populated when the operation is registered.

This is the dialect that this operation belongs to.

Definition at line 193 of file OperationSupport.h.

Referenced by mlir::DynamicOpDefinition::get(), mlir::DynamicOpDefinition::get(), mlir::DynamicOpDefinition::get(), getDialect(), Impl(), Impl(), mlir::RegisteredOperationName::Model< ConcreteOp >::Model(), and mlir::OperationName::UnregisteredOpModel::UnregisteredOpModel().

◆ interfaceMap

detail::InterfaceMap mlir::OperationName::Impl::interfaceMap
protected

A map of interfaces that were registered to this operation.

Definition at line 196 of file OperationSupport.h.

Referenced by getInterfaceMap(), Impl(), Impl(), and mlir::OperationName::UnregisteredOpModel::UnregisteredOpModel().

◆ name

◆ propertiesTypeID

TypeID mlir::OperationName::Impl::propertiesTypeID
protected

◆ typeID

TypeID mlir::OperationName::Impl::typeID
protected

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