MLIR
20.0.0git
|
A utility class to get, or create, unique instances of types within an MLIRContext. More...
#include "mlir/IR/TypeSupport.h"
Static Public Member Functions | |
template<typename T , typename... Args> | |
static T | get (MLIRContext *ctx, Args &&...args) |
Get an uniqued instance of a type T. More... | |
template<typename T , typename... Args> | |
static std::enable_if_t< !std::is_same< typename T::ImplType, TypeStorage >::value, T > | getWithTypeID (MLIRContext *ctx, TypeID typeID, Args &&...args) |
Get an uniqued instance of a parametric type T. More... | |
template<typename T > | |
static std::enable_if_t< std::is_same< typename T::ImplType, TypeStorage >::value, T > | getWithTypeID (MLIRContext *ctx, TypeID typeID) |
Get an uniqued instance of a singleton type T. More... | |
template<typename T , typename... Args> | |
static LogicalResult | mutate (MLIRContext *ctx, typename T::ImplType *impl, Args &&...args) |
Change the mutable component of the given type instance in the provided context. More... | |
template<typename T > | |
static void | registerType (MLIRContext *ctx) |
Register a type instance T with the uniquer. More... | |
template<typename T > | |
static std::enable_if_t< !std::is_same< typename T::ImplType, TypeStorage >::value > | registerType (MLIRContext *ctx, TypeID typeID) |
Register a parametric type instance T with the uniquer. More... | |
template<typename T > | |
static std::enable_if_t< std::is_same< typename T::ImplType, TypeStorage >::value > | registerType (MLIRContext *ctx, TypeID typeID) |
Register a singleton type instance T with the uniquer. More... | |
A utility class to get, or create, unique instances of types within an MLIRContext.
This class manages all creation and uniquing of types.
Definition at line 210 of file TypeSupport.h.
|
inlinestatic |
Get an uniqued instance of a type T.
Definition at line 213 of file TypeSupport.h.
References getWithTypeID().
|
inlinestatic |
Get an uniqued instance of a singleton type T.
The use of this method is in general discouraged in favor of 'get<T, Args>(ctx, args)'.
Definition at line 245 of file TypeSupport.h.
References mlir::StorageUniquer::get(), mlir::MLIRContext::getTypeUniquer(), and mlir::StorageUniquer::isSingletonStorageInitialized().
|
inlinestatic |
Get an uniqued instance of a parametric type T.
The use of this method is in general discouraged in favor of 'get<T, Args>(ctx, args)'.
Definition at line 224 of file TypeSupport.h.
References mlir::StorageUniquer::get(), mlir::MLIRContext::getTypeUniquer(), mlir::StorageUniquer::isParametricStorageInitialized(), and mlir::AbstractType::lookup().
Referenced by get().
|
inlinestatic |
Change the mutable component of the given type instance in the provided context.
Definition at line 260 of file TypeSupport.h.
References mlir::MLIRContext::getTypeUniquer(), and mlir::StorageUniquer::mutate().
|
inlinestatic |
Register a type instance T with the uniquer.
Definition at line 269 of file TypeSupport.h.
|
inlinestatic |
Register a parametric type instance T with the uniquer.
The use of this method is in general discouraged in favor of 'registerType<T>(ctx)'.
Definition at line 279 of file TypeSupport.h.
References mlir::MLIRContext::getTypeUniquer(), and mlir::StorageUniquer::registerParametricStorageType().
|
inlinestatic |
Register a singleton type instance T with the uniquer.
The use of this method is in general discouraged in favor of 'registerType<T>(ctx)'.
Definition at line 289 of file TypeSupport.h.
References mlir::MLIRContext::getTypeUniquer(), mlir::AbstractType::lookup(), and mlir::StorageUniquer::registerSingletonStorageType().