CIRCT  19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
circt::moore::detail::DimStorage Struct Reference
Inheritance diagram for circt::moore::detail::DimStorage:
Inheritance graph
[legend]
Collaboration diagram for circt::moore::detail::DimStorage:
Collaboration graph
[legend]

Public Types

using KeyTy = UnpackedType
 

Public Member Functions

 DimStorage (KeyTy key)
 
bool operator== (const KeyTy &key) const
 
LogicalResult mutate (TypeStorageAllocator &allocator, UnpackedType newResolved, UnpackedType newFullyResolved)
 
template<class ConcreteDim , typename... Args>
void finalize (ConcreteDim dim, Args... args) const
 Each dimension type calls this function from its get method. More...
 

Static Public Member Functions

static DimStorageconstruct (TypeStorageAllocator &allocator, const KeyTy &key)
 

Public Attributes

UnpackedType inner
 
UnpackedType resolved
 
UnpackedType fullyResolved
 

Detailed Description

Definition at line 653 of file MooreTypes.cpp.

Member Typedef Documentation

◆ KeyTy

Definition at line 654 of file MooreTypes.cpp.

Constructor & Destructor Documentation

◆ DimStorage()

circt::moore::detail::DimStorage::DimStorage ( KeyTy  key)
inline

Definition at line 656 of file MooreTypes.cpp.

Referenced by construct().

Member Function Documentation

◆ construct()

static DimStorage* circt::moore::detail::DimStorage::construct ( TypeStorageAllocator &  allocator,
const KeyTy key 
)
inlinestatic

Definition at line 658 of file MooreTypes.cpp.

References DimStorage().

◆ finalize()

template<class ConcreteDim , typename... Args>
void circt::moore::detail::DimStorage::finalize ( ConcreteDim  dim,
Args...  args 
) const
inline

Each dimension type calls this function from its get method.

The first argument, dim, is set to the type that was constructed by the call to Base::get. If that type has just been created, its resolved and fullyResolved fields are not yet set. If that is the case, the finalize method constructs the these resolved types by resolving the inner type appropriately and wrapping it in the dimension type. These wrapped types, which are equivalent to the dim itself but with the inner type resolved, are passed to DimStorage::mutate which fills in the resolved and fullyResolved fields behind a storage lock in the MLIRContext.

This has been inspired by https://reviews.llvm.org/D84171.

Definition at line 692 of file MooreTypes.cpp.

References assert(), circt::moore::UnpackedType::fullyResolved(), fullyResolved, circt::calyx::direction::get(), inner, circt::moore::UnpackedType::resolved(), and resolved.

◆ mutate()

LogicalResult circt::moore::detail::DimStorage::mutate ( TypeStorageAllocator &  allocator,
UnpackedType  newResolved,
UnpackedType  newFullyResolved 
)
inline

Definition at line 664 of file MooreTypes.cpp.

References fullyResolved, and resolved.

◆ operator==()

bool circt::moore::detail::DimStorage::operator== ( const KeyTy key) const
inline

Definition at line 657 of file MooreTypes.cpp.

References inner.

Member Data Documentation

◆ fullyResolved

UnpackedType circt::moore::detail::DimStorage::fullyResolved

Definition at line 709 of file MooreTypes.cpp.

Referenced by finalize(), circt::moore::UnpackedDim::fullyResolved(), and mutate().

◆ inner

UnpackedType circt::moore::detail::DimStorage::inner

◆ resolved

UnpackedType circt::moore::detail::DimStorage::resolved

Definition at line 708 of file MooreTypes.cpp.

Referenced by finalize(), mutate(), and circt::moore::UnpackedDim::resolved().


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