MLIR  20.0.0git
Public Types | Public Member Functions | Static Public Attributes | List of all members
mlir::RegisteredOperationName::Model< ConcreteOp > Struct Template Reference

Implementation of the InterfaceConcept for operation APIs that forwarded to a concrete op implementation. More...

#include "mlir/IR/OperationSupport.h"

+ Inheritance diagram for mlir::RegisteredOperationName::Model< ConcreteOp >:

Public Types

using Properties = std::remove_reference_t< decltype(std::declval< ConcreteOp >().getProperties())>
 Implementation for "Properties". More...
 

Public Member Functions

 Model (Dialect *dialect)
 
LogicalResult foldHook (Operation *op, ArrayRef< Attribute > attrs, SmallVectorImpl< OpFoldResult > &results) final
 
void getCanonicalizationPatterns (RewritePatternSet &set, MLIRContext *context) final
 
bool hasTrait (TypeID id) final
 
OperationName::ParseAssemblyFn getParseAssemblyFn () final
 
void populateDefaultAttrs (const OperationName &name, NamedAttrList &attrs) final
 
void printAssembly (Operation *op, OpAsmPrinter &printer, StringRef name) final
 
LogicalResult verifyInvariants (Operation *op) final
 
LogicalResult verifyRegionInvariants (Operation *op) final
 
std::optional< AttributegetInherentAttr (Operation *op, StringRef name) final
 Implementation for properties. More...
 
void setInherentAttr (Operation *op, StringAttr name, Attribute value) final
 
void populateInherentAttrs (Operation *op, NamedAttrList &attrs) final
 
LogicalResult verifyInherentAttrs (OperationName opName, NamedAttrList &attributes, function_ref< InFlightDiagnostic()> emitError) final
 
int getOpPropertyByteSize () final
 
void initProperties (OperationName opName, OpaqueProperties storage, OpaqueProperties init) final
 
void deleteProperties (OpaqueProperties prop) final
 
void populateDefaultProperties (OperationName opName, OpaqueProperties properties) final
 
LogicalResult setPropertiesFromAttr (OperationName opName, OpaqueProperties properties, Attribute attr, function_ref< InFlightDiagnostic()> emitError) final
 
Attribute getPropertiesAsAttr (Operation *op) final
 
bool compareProperties (OpaqueProperties lhs, OpaqueProperties rhs) final
 
void copyProperties (OpaqueProperties lhs, OpaqueProperties rhs) final
 
llvm::hash_code hashProperties (OpaqueProperties prop) final
 
- Public Member Functions inherited from mlir::OperationName::Impl
 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
 

Static Public Attributes

static constexpr bool hasProperties
 

Additional Inherited Members

- Protected Attributes inherited from mlir::OperationName::Impl
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...
 

Detailed Description

template<typename ConcreteOp>
struct mlir::RegisteredOperationName::Model< ConcreteOp >

Implementation of the InterfaceConcept for operation APIs that forwarded to a concrete op implementation.

Definition at line 532 of file OperationSupport.h.

Member Typedef Documentation

◆ Properties

template<typename ConcreteOp >
using mlir::RegisteredOperationName::Model< ConcreteOp >::Properties = std::remove_reference_t< decltype(std::declval<ConcreteOp>().getProperties())>

Implementation for "Properties".

Definition at line 565 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ Model()

template<typename ConcreteOp >
mlir::RegisteredOperationName::Model< ConcreteOp >::Model ( Dialect dialect)
inline

Definition at line 533 of file OperationSupport.h.

Member Function Documentation

◆ compareProperties()

template<typename ConcreteOp >
bool mlir::RegisteredOperationName::Model< ConcreteOp >::compareProperties ( OpaqueProperties  lhs,
OpaqueProperties  rhs 
)
inlinefinalvirtual

◆ copyProperties()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::copyProperties ( OpaqueProperties  lhs,
OpaqueProperties  rhs 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 662 of file OperationSupport.h.

◆ deleteProperties()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::deleteProperties ( OpaqueProperties  prop)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 626 of file OperationSupport.h.

◆ foldHook()

template<typename ConcreteOp >
LogicalResult mlir::RegisteredOperationName::Model< ConcreteOp >::foldHook ( Operation op,
ArrayRef< Attribute attrs,
SmallVectorImpl< OpFoldResult > &  results 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 536 of file OperationSupport.h.

◆ getCanonicalizationPatterns()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::getCanonicalizationPatterns ( RewritePatternSet set,
MLIRContext context 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 540 of file OperationSupport.h.

◆ getInherentAttr()

template<typename ConcreteOp >
std::optional<Attribute> mlir::RegisteredOperationName::Model< ConcreteOp >::getInherentAttr ( Operation ,
StringRef  name 
)
inlinefinalvirtual

Implementation for properties.

Implements mlir::OperationName::InterfaceConcept.

Definition at line 568 of file OperationSupport.h.

◆ getOpPropertyByteSize()

template<typename ConcreteOp >
int mlir::RegisteredOperationName::Model< ConcreteOp >::getOpPropertyByteSize ( )
inlinefinalvirtual

◆ getParseAssemblyFn()

template<typename ConcreteOp >
OperationName::ParseAssemblyFn mlir::RegisteredOperationName::Model< ConcreteOp >::getParseAssemblyFn ( )
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 545 of file OperationSupport.h.

References mlir::query::parse().

◆ getPropertiesAsAttr()

template<typename ConcreteOp >
Attribute mlir::RegisteredOperationName::Model< ConcreteOp >::getPropertiesAsAttr ( Operation op)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 647 of file OperationSupport.h.

◆ hashProperties()

template<typename ConcreteOp >
llvm::hash_code mlir::RegisteredOperationName::Model< ConcreteOp >::hashProperties ( OpaqueProperties  prop)
inlinefinalvirtual

◆ hasTrait()

template<typename ConcreteOp >
bool mlir::RegisteredOperationName::Model< ConcreteOp >::hasTrait ( TypeID  id)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 544 of file OperationSupport.h.

◆ initProperties()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::initProperties ( OperationName  opName,
OpaqueProperties  storage,
OpaqueProperties  init 
)
inlinefinalvirtual

◆ populateDefaultAttrs()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::populateDefaultAttrs ( const OperationName name,
NamedAttrList attrs 
)
inlinefinalvirtual

◆ populateDefaultProperties()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::populateDefaultProperties ( OperationName  opName,
OpaqueProperties  properties 
)
inlinefinalvirtual

◆ populateInherentAttrs()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::populateInherentAttrs ( Operation op,
NamedAttrList attrs 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 590 of file OperationSupport.h.

◆ printAssembly()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::printAssembly ( Operation op,
OpAsmPrinter printer,
StringRef  name 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 552 of file OperationSupport.h.

◆ setInherentAttr()

template<typename ConcreteOp >
void mlir::RegisteredOperationName::Model< ConcreteOp >::setInherentAttr ( Operation op,
StringAttr  name,
Attribute  value 
)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 579 of file OperationSupport.h.

◆ setPropertiesFromAttr()

template<typename ConcreteOp >
LogicalResult mlir::RegisteredOperationName::Model< ConcreteOp >::setPropertiesFromAttr ( OperationName  opName,
OpaqueProperties  properties,
Attribute  attr,
function_ref< InFlightDiagnostic()>  emitError 
)
inlinefinalvirtual

◆ verifyInherentAttrs()

template<typename ConcreteOp >
LogicalResult mlir::RegisteredOperationName::Model< ConcreteOp >::verifyInherentAttrs ( OperationName  opName,
NamedAttrList attributes,
function_ref< InFlightDiagnostic()>  emitError 
)
inlinefinalvirtual

◆ verifyInvariants()

template<typename ConcreteOp >
LogicalResult mlir::RegisteredOperationName::Model< ConcreteOp >::verifyInvariants ( Operation op)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 556 of file OperationSupport.h.

◆ verifyRegionInvariants()

template<typename ConcreteOp >
LogicalResult mlir::RegisteredOperationName::Model< ConcreteOp >::verifyRegionInvariants ( Operation op)
inlinefinalvirtual

Implements mlir::OperationName::InterfaceConcept.

Definition at line 559 of file OperationSupport.h.

Member Data Documentation

◆ hasProperties

template<typename ConcreteOp >
constexpr bool mlir::RegisteredOperationName::Model< ConcreteOp >::hasProperties
staticconstexpr

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