|
MLIR
22.0.0git
|
Base symbol cache class to allow for cache lookup through a pointer to some abstract cache. More...
#include "mlir/Target/SMTLIB/SymCache.h"
Inheritance diagram for mlir::SymbolCacheBase: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 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 mlir::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 |
|
pure virtual |
Defines 'op' as associated with the 'symbol' in the cache.
Implemented in mlir::SymbolCache.
Referenced by addSymbol().
| void mlir::SymbolCacheBase::addDefinitions | ( | mlir::Operation * | top | ) |
Populate the symbol cache with all symbol-defining operations within the 'top' operation.
|
inline |
Adds the symbol-defining 'op' to the cache.
Definition at line 33 of file SymCache.h.
References addDefinition().
|
pure virtual |
Implemented in mlir::SymbolCache.
|
pure virtual |
Implemented in mlir::SymbolCache.
|
pure virtual |
Lookup a definition for 'symbol' in the cache.
Implemented in mlir::SymbolCache.
Referenced by getDefinition().
|
inline |
Lookup a definition for 'symbol' in the cache.
Definition at line 45 of file SymCache.h.
References mlir::FlatSymbolRefAttr::getAttr(), and getDefinition().