MLIR  20.0.0git
Static Public Member Functions | List of all members
mlir::detail::AttributeUniquer Class Reference

#include "mlir/IR/AttributeSupport.h"

Static Public Member Functions

template<typename T , typename... Args>
static T get (MLIRContext *ctx, Args &&...args)
 Get an uniqued instance of an attribute T. More...
 
template<typename T , typename... Args>
static std::enable_if_t< !std::is_same< typename T::ImplType, AttributeStorage >::value, T > getWithTypeID (MLIRContext *ctx, TypeID typeID, Args &&...args)
 Get an uniqued instance of a parametric attribute T. More...
 
template<typename T >
static std::enable_if_t< std::is_same< typename T::ImplType, AttributeStorage >::value, T > getWithTypeID (MLIRContext *ctx, TypeID typeID)
 Get an uniqued instance of a singleton attribute T. More...
 
template<typename T , typename... Args>
static LogicalResult mutate (MLIRContext *ctx, typename T::ImplType *impl, Args &&...args)
 
template<typename T >
static void registerAttribute (MLIRContext *ctx)
 Register an attribute instance T with the uniquer. More...
 
template<typename T >
static std::enable_if_t< !std::is_same< typename T::ImplType, AttributeStorage >::value > registerAttribute (MLIRContext *ctx, TypeID typeID)
 Register a parametric attribute instance T with the uniquer. More...
 
template<typename T >
static std::enable_if_t< std::is_same< typename T::ImplType, AttributeStorage >::value > registerAttribute (MLIRContext *ctx, TypeID typeID)
 Register a singleton attribute instance T with the uniquer. More...
 

Detailed Description

Definition at line 215 of file AttributeSupport.h.

Member Function Documentation

◆ get()

template<typename T , typename... Args>
static T mlir::detail::AttributeUniquer::get ( MLIRContext ctx,
Args &&...  args 
)
inlinestatic

Get an uniqued instance of an attribute T.

Definition at line 219 of file AttributeSupport.h.

References getWithTypeID().

◆ getWithTypeID() [1/2]

template<typename T >
static std::enable_if_t< std::is_same<typename T::ImplType, AttributeStorage>::value, T> mlir::detail::AttributeUniquer::getWithTypeID ( MLIRContext ctx,
TypeID  typeID 
)
inlinestatic

Get an uniqued instance of a singleton attribute T.

The use of this method is in general discouraged in favor of 'get<T, Args>(ctx, args)'.

Definition at line 255 of file AttributeSupport.h.

References mlir::StorageUniquer::get(), mlir::MLIRContext::getAttributeUniquer(), and mlir::StorageUniquer::isSingletonStorageInitialized().

◆ getWithTypeID() [2/2]

template<typename T , typename... Args>
static std::enable_if_t< !std::is_same<typename T::ImplType, AttributeStorage>::value, T> mlir::detail::AttributeUniquer::getWithTypeID ( MLIRContext ctx,
TypeID  typeID,
Args &&...  args 
)
inlinestatic

Get an uniqued instance of a parametric attribute T.

The use of this method is in general discouraged in favor of 'get<T, Args>(ctx, args)'.

Definition at line 230 of file AttributeSupport.h.

References mlir::StorageUniquer::get(), mlir::MLIRContext::getAttributeUniquer(), and mlir::StorageUniquer::isParametricStorageInitialized().

Referenced by get().

◆ mutate()

template<typename T , typename... Args>
static LogicalResult mlir::detail::AttributeUniquer::mutate ( MLIRContext ctx,
typename T::ImplType *  impl,
Args &&...  args 
)
inlinestatic

◆ registerAttribute() [1/3]

template<typename T >
static void mlir::detail::AttributeUniquer::registerAttribute ( MLIRContext ctx)
inlinestatic

Register an attribute instance T with the uniquer.

Definition at line 277 of file AttributeSupport.h.

◆ registerAttribute() [2/3]

template<typename T >
static std::enable_if_t< !std::is_same<typename T::ImplType, AttributeStorage>::value> mlir::detail::AttributeUniquer::registerAttribute ( MLIRContext ctx,
TypeID  typeID 
)
inlinestatic

Register a parametric attribute instance T with the uniquer.

The use of this method is in general discouraged in favor of 'registerAttribute<T>(ctx)'.

Definition at line 287 of file AttributeSupport.h.

References mlir::MLIRContext::getAttributeUniquer(), and mlir::StorageUniquer::registerParametricStorageType().

◆ registerAttribute() [3/3]

template<typename T >
static std::enable_if_t< std::is_same<typename T::ImplType, AttributeStorage>::value> mlir::detail::AttributeUniquer::registerAttribute ( MLIRContext ctx,
TypeID  typeID 
)
inlinestatic

Register a singleton attribute instance T with the uniquer.

The use of this method is in general discouraged in favor of 'registerAttribute<T>(ctx)'.

Definition at line 297 of file AttributeSupport.h.

References mlir::MLIRContext::getAttributeUniquer(), and mlir::StorageUniquer::registerSingletonStorageType().


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