MLIR  21.0.0git
Classes | Public Types | Public Member Functions | List of all members
mlir::SymbolCacheBase Class Referenceabstract

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::OperationgetDefinition (mlir::Attribute symbol) const =0
 Lookup a definition for 'symbol' in the cache. More...
 
mlir::OperationgetDefinition (mlir::FlatSymbolRefAttr symbol) const
 Lookup a definition for 'symbol' in the cache. More...
 
virtual Iterator begin ()=0
 
virtual Iterator end ()=0
 

Detailed Description

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.

Member Typedef Documentation

◆ CacheItem

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.

Constructor & Destructor Documentation

◆ ~SymbolCacheBase()

virtual mlir::SymbolCacheBase::~SymbolCacheBase ( )
virtual

Member Function Documentation

◆ addDefinition()

virtual void mlir::SymbolCacheBase::addDefinition ( mlir::Attribute  symbol,
mlir::Operation op 
)
pure virtual

Defines 'op' as associated with the 'symbol' in the cache.

Implemented in mlir::SymbolCache.

Referenced by addSymbol().

◆ addDefinitions()

void mlir::SymbolCacheBase::addDefinitions ( mlir::Operation top)

Populate the symbol cache with all symbol-defining operations within the 'top' operation.

◆ addSymbol()

void mlir::SymbolCacheBase::addSymbol ( mlir::SymbolOpInterface  op)
inline

Adds the symbol-defining 'op' to the cache.

Definition at line 33 of file SymCache.h.

References addDefinition().

◆ begin()

virtual Iterator mlir::SymbolCacheBase::begin ( )
pure virtual

Implemented in mlir::SymbolCache.

◆ end()

virtual Iterator mlir::SymbolCacheBase::end ( )
pure virtual

Implemented in mlir::SymbolCache.

◆ getDefinition() [1/2]

virtual mlir::Operation* mlir::SymbolCacheBase::getDefinition ( mlir::Attribute  symbol) const
pure virtual

Lookup a definition for 'symbol' in the cache.

Implemented in mlir::SymbolCache.

Referenced by getDefinition().

◆ getDefinition() [2/2]

mlir::Operation* mlir::SymbolCacheBase::getDefinition ( mlir::FlatSymbolRefAttr  symbol) const
inline

Lookup a definition for 'symbol' in the cache.

Definition at line 45 of file SymCache.h.

References mlir::FlatSymbolRefAttr::getAttr(), and getDefinition().


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