|
CIRCT 22.0.0git
|
This stores lookup tables to make manipulating and working with the IR more efficient. More...
#include <HWSymCache.h>


Classes | |
| struct | HwSymbolCacheIteratorImpl |
| class | Item |
Public Member Functions | |
| void | addDefinition (mlir::StringAttr modSymbol, mlir::StringAttr name, mlir::Operation *op, size_t port=~0ULL) |
| void | addDefinition (mlir::Attribute key, mlir::Operation *op) override |
| Defines 'op' as associated with the 'symbol' in the cache. | |
| mlir::Operation * | getDefinition (mlir::Attribute attr) const override |
| Lookup a definition for 'symbol' in the cache. | |
| HWSymbolCache::Item | getInnerDefinition (mlir::StringAttr modSymbol, mlir::StringAttr name) const |
| HWSymbolCache::Item | getInnerDefinition (InnerRefAttr inner) const |
| void | freeze () |
| Mark the cache as frozen, which allows it to be shared across threads. | |
| SymbolCacheBase::Iterator | begin () override |
| SymbolCacheBase::Iterator | end () override |
| virtual mlir::Operation * | getDefinition (mlir::Attribute symbol) const=0 |
| Lookup a definition for 'symbol' in the cache. | |
| mlir::Operation * | getDefinition (mlir::FlatSymbolRefAttr symbol) const |
| Lookup a definition for 'symbol' in the cache. | |
Public Member Functions inherited from circt::SymbolCacheBase | |
| virtual | ~SymbolCacheBase () |
| Virtual method anchor. | |
| void | addSymbol (mlir::SymbolOpInterface op) |
| Adds the symbol-defining 'op' to the cache. | |
| void | addDefinitions (mlir::Operation *top) |
| Populate the symbol cache with all symbol-defining operations within the 'top' operation. | |
| mlir::Operation * | getDefinition (mlir::FlatSymbolRefAttr symbol) const |
| Lookup a definition for 'symbol' in the cache. | |
Private Types | |
| using | Iterator = decltype(symbolCache)::iterator |
Private Member Functions | |
| Item | lookupInner (InnerRefAttr attr) const |
Private Attributes | |
| bool | isFrozen = false |
| llvm::DenseMap< mlir::Attribute, Item > | symbolCache |
| This stores a lookup table from symbol attribute to the item that defines it. | |
Additional Inherited Members | |
Public Types inherited from circt::SymbolCacheBase | |
| using | CacheItem = std::pair< mlir::Attribute, mlir::Operation * > |
| Iterator support through a pointer to some abstract cache. | |
This stores lookup tables to make manipulating and working with the IR more efficient.
There are two phases to this object: the "building" phase in which it is "write only" and then the "using" phase which is read-only (and thus can be used by multiple threads). The "freeze" method transitions between the two states.
Definition at line 27 of file HWSymCache.h.
|
private |
Definition at line 92 of file HWSymCache.h.
|
inlineoverridevirtual |
Defines 'op' as associated with the 'symbol' in the cache.
Implements circt::SymbolCacheBase.
Definition at line 49 of file HWSymCache.h.
References assert(), isFrozen, and symbolCache.
|
inline |
Definition at line 43 of file HWSymCache.h.
References symbolCache.
Referenced by circt::ExportVerilog::SharedEmitterState::gatherFiles(), and circt::msft::TclEmitter::populate().
|
inlineoverridevirtual |
Implements circt::SymbolCacheBase.
Definition at line 106 of file HWSymCache.h.
References symbolCache.
|
inlineoverridevirtual |
Implements circt::SymbolCacheBase.
Definition at line 110 of file HWSymCache.h.
References symbolCache.
|
inline |
Mark the cache as frozen, which allows it to be shared across threads.
Definition at line 75 of file HWSymCache.h.
References isFrozen.
Referenced by circt::ExportVerilog::SharedEmitterState::gatherFiles(), and circt::msft::TclEmitter::populate().
|
inlineoverridevirtual |
Lookup a definition for 'symbol' in the cache.
Implements circt::SymbolCacheBase.
Definition at line 56 of file HWSymCache.h.
References assert(), isFrozen, and symbolCache.
Referenced by circt::msft::TclEmitter::getDefinition(), circt::msft::getHierPathTopModule(), getReferencedMacro(), isAssertOp(), isAssumeOp(), isCoverOp(), and circt::msft::TclEmitter::populate().
|
virtual |
Lookup a definition for 'symbol' in the cache.
Implements circt::SymbolCacheBase.
|
inline |
Lookup a definition for 'symbol' in the cache.
Definition at line 45 of file SymCache.h.
|
inline |
Definition at line 70 of file HWSymCache.h.
References lookupInner().
|
inline |
Definition at line 65 of file HWSymCache.h.
References lookupInner().
|
inlineprivate |
Definition at line 78 of file HWSymCache.h.
References assert(), isFrozen, and symbolCache.
Referenced by getInnerDefinition(), and getInnerDefinition().
|
private |
Definition at line 84 of file HWSymCache.h.
Referenced by addDefinition(), freeze(), getDefinition(), and lookupInner().
|
private |
This stores a lookup table from symbol attribute to the item that defines it.
Definition at line 88 of file HWSymCache.h.
Referenced by addDefinition(), addDefinition(), begin(), end(), getDefinition(), and lookupInner().