My Project
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
mlir::Attribute Class Reference

#include <Attributes.h>

Inheritance diagram for mlir::Attribute:
Inheritance graph
[legend]
Collaboration diagram for mlir::Attribute:
Collaboration graph
[legend]

Public Types

enum  Kind { DEFINE_SYM_KIND_RANGE, DEFINE_SYM_KIND_RANGE }
 Integer identifier for all the concrete attribute kinds. More...
 
template<typename ConcreteType , typename BaseType = Attribute, typename StorageType = AttributeStorage>
using AttrBase = detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::AttributeUniquer >
 Utility class for implementing attributes. More...
 
using ImplType = AttributeStorage
 
using ValueType = void
 

Public Member Functions

 Attribute ()
 
 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
 
template<typename U >
bool isa () const
 
template<typename U >
U dyn_cast () const
 
template<typename U >
U dyn_cast_or_null () const
 
template<typename U >
U cast () const
 
unsigned getKind () const
 Return the classification for this attribute. More...
 
Type getType () const
 Return the type of this attribute. More...
 
MLIRContext * getContext () const
 Return the context this attribute belongs to. More...
 
Dialect & getDialect () const
 Get the dialect this attribute is registered to. More...
 
void print (raw_ostream &os) const
 Print the attribute. More...
 
void dump () const
 
const void * getAsOpaquePointer () const
 Get an opaque pointer to the attribute. More...
 

Static Public Member Functions

static bool classof (Attribute)
 
static Attribute getFromOpaquePointer (const void *ptr)
 Construct an attribute from the opaque pointer representation. More...
 

Protected Attributes

ImplType * impl
 

Friends

::llvm::hash_code hash_value (Attribute arg)
 

Detailed Description

Attributes are known-constant values of operations and functions.

Instances of the Attribute class are references to immutable, uniqued, and immortal values owned by MLIRContext. As such, an Attribute is a thin wrapper around an underlying storage pointer. Attributes are usually passed by value.

Member Typedef Documentation

◆ AttrBase

template<typename ConcreteType , typename BaseType = Attribute, typename StorageType = AttributeStorage>
using mlir::Attribute::AttrBase = detail::StorageUserBase<ConcreteType, BaseType, StorageType, detail::AttributeUniquer>

Utility class for implementing attributes.

◆ ImplType

◆ ValueType

Member Enumeration Documentation

◆ Kind

Integer identifier for all the concrete attribute kinds.

Enumerator
DEFINE_SYM_KIND_RANGE 
DEFINE_SYM_KIND_RANGE 

Constructor & Destructor Documentation

◆ Attribute() [1/3]

mlir::Attribute::Attribute ( )
inline

◆ Attribute() [2/3]

mlir::Attribute::Attribute ( const ImplType *  impl)
inline

◆ Attribute() [3/3]

mlir::Attribute::Attribute ( const Attribute &  other)
default

Member Function Documentation

◆ cast()

template<typename U >
U mlir::Attribute::cast ( ) const

◆ classof()

static bool mlir::Attribute::classof ( Attribute  )
inlinestatic

◆ dump()

void Attribute::dump ( ) const

◆ dyn_cast()

template<typename U >
U mlir::Attribute::dyn_cast ( ) const

◆ dyn_cast_or_null()

template<typename U >
U mlir::Attribute::dyn_cast_or_null ( ) const

◆ getAsOpaquePointer()

const void* mlir::Attribute::getAsOpaquePointer ( ) const
inline

Get an opaque pointer to the attribute.

◆ getContext()

MLIRContext * Attribute::getContext ( ) const

Return the context this attribute belongs to.

◆ getDialect()

Dialect & Attribute::getDialect ( ) const

Get the dialect this attribute is registered to.

◆ getFromOpaquePointer()

static Attribute mlir::Attribute::getFromOpaquePointer ( const void *  ptr)
inlinestatic

Construct an attribute from the opaque pointer representation.

◆ getKind()

unsigned mlir::Attribute::getKind ( ) const
inline

Return the classification for this attribute.

◆ getType()

Type Attribute::getType ( ) const

Return the type of this attribute.

◆ isa()

template<typename U >
bool mlir::Attribute::isa ( ) const

◆ operator bool()

mlir::Attribute::operator bool ( ) const
inlineexplicit

◆ operator!()

bool mlir::Attribute::operator! ( ) const
inline

◆ operator!=()

bool mlir::Attribute::operator!= ( Attribute  other) const
inline

◆ operator=()

Attribute& mlir::Attribute::operator= ( const Attribute &  other)
default

◆ operator==()

bool mlir::Attribute::operator== ( Attribute  other) const
inline

◆ print()

void Attribute::print ( raw_ostream &  os) const

Print the attribute.

Friends And Related Function Documentation

◆ hash_value

::llvm::hash_code hash_value ( Attribute  arg)
friend

Member Data Documentation

◆ impl

ImplType* mlir::Attribute::impl
protected

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