My Project
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
mlir::detail::StorageUniquerImpl Struct Reference

This is the implementation of the StorageUniquer class. More...

Collaboration diagram for mlir::detail::StorageUniquerImpl:
Collaboration graph
[legend]

Classes

struct  HashedStorage
 
struct  LookupKey
 A lookup key for derived instances of storage objects. More...
 
struct  StorageKeyInfo
 Storage info for derived TypeStorage objects. More...
 

Public Types

using BaseStorage = StorageUniquer::BaseStorage
 
using StorageAllocator = StorageUniquer::StorageAllocator
 
using StorageTypeSet = DenseSet< HashedStorage, StorageKeyInfo >
 

Public Member Functions

BaseStoragegetOrCreate (unsigned kind, unsigned hashValue, function_ref< bool(const BaseStorage *)> isEqual, function_ref< BaseStorage *(StorageAllocator &)> ctorFn)
 Get or create an instance of a complex derived type. More...
 
BaseStoragegetOrCreate (unsigned kind, function_ref< BaseStorage *(StorageAllocator &)> ctorFn)
 Get or create an instance of a simple derived type. More...
 
void erase (unsigned kind, unsigned hashValue, function_ref< bool(const BaseStorage *)> isEqual, function_ref< void(BaseStorage *)> cleanupFn)
 Erase an instance of a complex derived type. More...
 
BaseStorageinitializeStorage (unsigned kind, function_ref< BaseStorage *(StorageAllocator &)> ctorFn)
 Utility to create and initialize a storage instance. More...
 

Public Attributes

StorageTypeSet storageTypes
 
DenseMap< unsigned, BaseStorage * > simpleTypes
 
StorageUniquer::StorageAllocator allocator
 
llvm::sys::SmartRWMutex< true > mutex
 

Detailed Description

This is the implementation of the StorageUniquer class.

Member Typedef Documentation

◆ BaseStorage

◆ StorageAllocator

◆ StorageTypeSet

Member Function Documentation

◆ erase()

void mlir::detail::StorageUniquerImpl::erase ( unsigned  kind,
unsigned  hashValue,
function_ref< bool(const BaseStorage *)>  isEqual,
function_ref< void(BaseStorage *)>  cleanupFn 
)
inline

Erase an instance of a complex derived type.

◆ getOrCreate() [1/2]

BaseStorage* mlir::detail::StorageUniquerImpl::getOrCreate ( unsigned  kind,
unsigned  hashValue,
function_ref< bool(const BaseStorage *)>  isEqual,
function_ref< BaseStorage *(StorageAllocator &)>  ctorFn 
)
inline

Get or create an instance of a complex derived type.

◆ getOrCreate() [2/2]

BaseStorage* mlir::detail::StorageUniquerImpl::getOrCreate ( unsigned  kind,
function_ref< BaseStorage *(StorageAllocator &)>  ctorFn 
)
inline

Get or create an instance of a simple derived type.

◆ initializeStorage()

BaseStorage* mlir::detail::StorageUniquerImpl::initializeStorage ( unsigned  kind,
function_ref< BaseStorage *(StorageAllocator &)>  ctorFn 
)
inline

Utility to create and initialize a storage instance.

Member Data Documentation

◆ allocator

StorageUniquer::StorageAllocator mlir::detail::StorageUniquerImpl::allocator

◆ mutex

llvm::sys::SmartRWMutex<true> mlir::detail::StorageUniquerImpl::mutex

◆ simpleTypes

DenseMap<unsigned, BaseStorage *> mlir::detail::StorageUniquerImpl::simpleTypes

◆ storageTypes

StorageTypeSet mlir::detail::StorageUniquerImpl::storageTypes

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