|
MLIR 22.0.0git
|
This class represents the base of an attribute interface. More...
#include "mlir/IR/Attributes.h"
Public Types | |
| using | Base = AttributeInterface<ConcreteType, Traits> |
| using | InterfaceBase |
| Public Types inherited from mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase > | |
| using | Concept |
| using | Model |
| using | FallbackModel |
| using | InterfaceBase |
| using | ExternalModel |
| using | ValueType |
| Public Types inherited from mlir::Attribute | |
| template<typename ConcreteType, typename BaseType, typename StorageType, template< typename T > class... Traits> | |
| using | AttrBase |
| Utility class for implementing attributes. | |
| using | ImplType = AttributeStorage |
| using | ValueType = void |
| using | AbstractTy = AbstractAttribute |
Static Protected Member Functions | |
| static InterfaceBase::Concept * | getInterfaceFor (Attribute attr) |
| Returns the impl interface instance for the given type. | |
Protected Attributes | |
| friend | InterfaceBase |
| Allow access to 'getInterfaceFor'. | |
| Protected Attributes inherited from mlir::Attribute | |
| ImplType * | impl {nullptr} |
Additional Inherited Members | |
| Public Member Functions inherited from mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase > | |
| Interface (Attribute t=Attribute()) | |
| Construct an interface from an instance of the value type. | |
| Interface (std::nullptr_t) | |
| Interface (T t) | |
| Construct an interface instance from a type that implements this interface's trait. | |
| Interface (Attribute t, const Concept *conceptImpl) | |
| Constructor for a known concept. | |
| Interface (Attribute t, std::nullptr_t) | |
| Constructor for DenseMapInfo's empty key and tombstone key. | |
| Public Member Functions inherited from mlir::Attribute | |
| constexpr | Attribute ()=default |
| Attribute (const ImplType *impl) | |
| Attribute (const Attribute &other)=default | |
| Attribute & | operator= (const Attribute &other)=default |
| bool | operator== (Attribute other) const |
| bool | operator!= (Attribute other) const |
| operator bool () const | |
| bool | operator! () const |
| TypeID | getTypeID () |
| Return a unique identifier for the concrete attribute type. | |
| MLIRContext * | getContext () const |
| Return the context this attribute belongs to. | |
| Dialect & | getDialect () const |
| Get the dialect this attribute is registered to. | |
| void | print (raw_ostream &os, bool elideType=false) const |
| Print the attribute. | |
| void | print (raw_ostream &os, AsmState &state, bool elideType=false) const |
| void | dump () const |
| void | printStripped (raw_ostream &os) const |
| Print the attribute without dialect wrapping. | |
| void | printStripped (raw_ostream &os, AsmState &state) const |
| const void * | getAsOpaquePointer () const |
| Get an opaque pointer to the attribute. | |
| friend::llvm::hash_code | hash_value (Attribute arg) |
| template<typename InterfaceT> | |
| bool | hasPromiseOrImplementsInterface () |
| Returns true if InterfaceT has been promised by the dialect or implemented. | |
| template<template< typename T > class Trait> | |
| bool | hasTrait () |
| Returns true if the type was registered with a particular trait. | |
| const AbstractTy & | getAbstractAttribute () const |
| Return the abstract descriptor for this attribute. | |
| void | walkImmediateSubElements (function_ref< void(Attribute)> walkAttrsFn, function_ref< void(Type)> walkTypesFn) const |
| Walk all of the immediately nested sub-attributes and sub-types. | |
| auto | replaceImmediateSubElements (ArrayRef< Attribute > replAttrs, ArrayRef< Type > replTypes) const |
| Replace the immediately nested sub-attributes and sub-types with those provided. | |
| template<WalkOrder Order = WalkOrder::PostOrder, typename... WalkFns> | |
| auto | walk (WalkFns &&...walkFns) |
| Walk this attribute and all attibutes/types nested within using the provided walk functions. | |
| template<typename... ReplacementFns> | |
| auto | replace (ReplacementFns &&...replacementFns) |
| Recursively replace all of the nested sub-attributes and sub-types using the provided map functions. | |
| ImplType * | getImpl () const |
| Return the internal Attribute implementation. | |
| Static Public Member Functions inherited from mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase > | |
| static bool | classof (Attribute t) |
| Support 'classof' by checking if the given object defines the concrete interface. | |
| static TypeID | getInterfaceID () |
| Define an accessor for the ID of this interface. | |
| Static Public Member Functions inherited from mlir::Attribute | |
| static Attribute | getFromOpaquePointer (const void *ptr) |
| Construct an attribute from the opaque pointer representation. | |
| Protected Member Functions inherited from mlir::detail::Interface< ConcreteType, Attribute, Traits, Attribute, AttributeTrait::TraitBase > | |
| const Concept * | getImpl () const |
| Get the raw concept in the correct derived concept type. | |
| Concept * | getImpl () |
This class represents the base of an attribute interface.
See the definition of detail::Interface for requirements on the Traits type.
Definition at line 252 of file Attributes.h.
| using mlir::AttributeInterface< ConcreteType, Traits >::Base = AttributeInterface<ConcreteType, Traits> |
Definition at line 256 of file Attributes.h.
| using mlir::AttributeInterface< ConcreteType, Traits >::InterfaceBase |
Definition at line 257 of file Attributes.h.
|
inlinestaticprotected |
Returns the impl interface instance for the given type.
Definition at line 263 of file Attributes.h.
References mlir::Attribute::getAbstractAttribute(), mlir::Attribute::getDialect(), mlir::AbstractAttribute::getInterface(), mlir::Attribute::getTypeID(), and mlir::dialect_extension_detail::handleUseOfUndefinedPromisedInterface().
|
protected |
Allow access to 'getInterfaceFor'.
Definition at line 276 of file Attributes.h.