MLIR  20.0.0git
Public Member Functions | Protected Attributes | Friends | List of all members
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. More...
 
detail::InterfaceMapgetInterfaceMap ()
 
DialectgetDialect () const
 
StringAttr getName () const
 
TypeID getTypeID () 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. More...
 
virtual void setInherentAttr (Operation *op, StringAttr name, Attribute value)=0
 
virtual void populateInherentAttrs (Operation *op, NamedAttrList &attrs)=0
 
virtual LogicalResult verifyInherentAttrs (OperationName opName, NamedAttrList &attributes, function_ref< InFlightDiagnostic()> emitError)=0
 
virtual int getOpPropertyByteSize ()=0
 
virtual void initProperties (OperationName opName, OpaqueProperties storage, OpaqueProperties init)=0
 
virtual void deleteProperties (OpaqueProperties)=0
 
virtual void populateDefaultProperties (OperationName opName, OpaqueProperties properties)=0
 
virtual LogicalResult setPropertiesFromAttr (OperationName, OpaqueProperties, Attribute, function_ref< InFlightDiagnostic()> emitError)=0
 
virtual Attribute getPropertiesAsAttr (Operation *)=0
 
virtual void copyProperties (OpaqueProperties, OpaqueProperties)=0
 
virtual bool compareProperties (OpaqueProperties, OpaqueProperties)=0
 
virtual llvm::hash_code hashProperties (OpaqueProperties)=0
 

Protected Attributes

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

Friends

class RegisteredOperationName
 

Detailed Description

Definition at line 148 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ Impl() [1/2]

OperationName::Impl::Impl ( StringRef  name,
Dialect dialect,
TypeID  typeID,
detail::InterfaceMap  interfaceMap 
)

Definition at line 772 of file MLIRContext.cpp.

◆ Impl() [2/2]

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

Definition at line 152 of file OperationSupport.h.

Member Function Documentation

◆ getAttributeNames()

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

Definition at line 163 of file OperationSupport.h.

References attributeNames.

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

◆ getDialect()

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

◆ getInterfaceMap()

detail::InterfaceMap& mlir::OperationName::Impl::getInterfaceMap ( )
inline

◆ getName()

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

Definition at line 161 of file OperationSupport.h.

References name.

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

◆ getTypeID()

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

Definition at line 162 of file OperationSupport.h.

References typeID.

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

◆ isRegistered()

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

Returns true if this is a registered operation.

Definition at line 158 of file OperationSupport.h.

References typeID.

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

Friends And Related Function Documentation

◆ RegisteredOperationName

Definition at line 189 of file OperationSupport.h.

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 187 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 179 of file OperationSupport.h.

Referenced by mlir::DynamicOpDefinition::get(), and getDialect().

◆ interfaceMap

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

A map of interfaces that were registered to this operation.

Definition at line 182 of file OperationSupport.h.

Referenced by getInterfaceMap().

◆ name

StringAttr mlir::OperationName::Impl::name
protected

◆ typeID

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

The unique identifier of the derived Op class.

Definition at line 173 of file OperationSupport.h.

Referenced by mlir::DynamicOpDefinition::getTypeID(), getTypeID(), and isRegistered().


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