CIRCT
20.0.0git
|
Base symbol cache class to allow for cache lookup through a pointer to some abstract cache. More...
#include <SymCache.h>
Classes | |
struct | CacheIteratorImpl |
struct | Iterator |
Public Types | |
using | CacheItem = std::pair< mlir::Attribute, mlir::Operation * > |
Iterator support through a pointer to some abstract cache. More... | |
Public Member Functions | |
virtual | ~SymbolCacheBase () |
Virtual method anchor. More... | |
virtual void | addDefinition (mlir::Attribute symbol, mlir::Operation *op)=0 |
Defines 'op' as associated with the 'symbol' in the cache. More... | |
void | addSymbol (mlir::SymbolOpInterface op) |
Adds the symbol-defining 'op' to the cache. More... | |
void | addDefinitions (mlir::Operation *top) |
Populate the symbol cache with all symbol-defining operations within the 'top' operation. More... | |
virtual mlir::Operation * | getDefinition (mlir::Attribute symbol) const =0 |
Lookup a definition for 'symbol' in the cache. More... | |
mlir::Operation * | getDefinition (mlir::FlatSymbolRefAttr symbol) const |
Lookup a definition for 'symbol' in the cache. More... | |
virtual Iterator | begin ()=0 |
virtual Iterator | end ()=0 |
Base symbol cache class to allow for cache lookup through a pointer to some abstract cache.
A symbol cache stores lookup tables to make manipulating and working with the IR more efficient.
Definition at line 25 of file SymCache.h.
using circt::SymbolCacheBase::CacheItem = std::pair<mlir::Attribute, mlir::Operation *> |
Iterator support through a pointer to some abstract cache.
The implementing cache must provide an iterator that carries values on the form of <mlir::Attribute, mlir::Operation*>.
Definition at line 52 of file SymCache.h.
|
virtual |
Virtual method anchor.
Definition at line 21 of file SymCache.cpp.
|
pure virtual |
Defines 'op' as associated with the 'symbol' in the cache.
Implemented in circt::SymbolCache, and circt::hw::HWSymbolCache.
Referenced by addSymbol().
void circt::SymbolCacheBase::addDefinitions | ( | mlir::Operation * | top | ) |
Populate the symbol cache with all symbol-defining operations within the 'top' operation.
Definition at line 23 of file SymCache.cpp.
Referenced by circt::SMTGlobalsHandler::create(), circt::FirMemLowering::FirMemLowering(), and circt::SMTGlobalsHandler::SMTGlobalsHandler().
|
inline |
Adds the symbol-defining 'op' to the cache.
Definition at line 33 of file SymCache.h.
References addDefinition().
Referenced by circt::ExportVerilog::lowerHWInstanceChoices().
|
pure virtual |
Implemented in circt::SymbolCache, and circt::hw::HWSymbolCache.
|
pure virtual |
Implemented in circt::SymbolCache, and circt::hw::HWSymbolCache.
|
pure virtual |
Lookup a definition for 'symbol' in the cache.
Implemented in circt::SymbolCache, and circt::hw::HWSymbolCache.
Referenced by getDefinition().
|
inline |
Lookup a definition for 'symbol' in the cache.
Definition at line 45 of file SymCache.h.
References getDefinition().