MLIR
22.0.0git
|
This class implements a lock-based shared wrapper around a symbol table collection that allows shared access to the collection of symbol tables. More...
#include "mlir/IR/SymbolTable.h"
Public Member Functions | |
LockedSymbolTableCollection (SymbolTableCollection &collection) | |
Operation * | lookupSymbolIn (Operation *symbolTableOp, StringAttr symbol) override |
Look up a symbol with the specified name within the specified symbol table operation, returning null if no such name exists. More... | |
Operation * | lookupSymbolIn (Operation *symbolTableOp, FlatSymbolRefAttr symbol) |
Look up a symbol with the specified name within the specified symbol table operation, returning null if no such name exists. More... | |
Operation * | lookupSymbolIn (Operation *symbolTableOp, SymbolRefAttr name) override |
Look up a potentially nested symbol within the specified symbol table operation, returning null if no such symbol exists. More... | |
template<typename T , typename NameT > | |
T | lookupSymbolIn (Operation *symbolTableOp, NameT &&name) |
Lookup a symbol of a particular kind within the specified symbol table, returning null if the symbol was not found. More... | |
LogicalResult | lookupSymbolIn (Operation *symbolTableOp, SymbolRefAttr name, SmallVectorImpl< Operation * > &symbols) override |
A variant of 'lookupSymbolIn' that returns all of the symbols referenced by a given SymbolRefAttr when resolved within the provided symbol table operation. More... | |
![]() | |
virtual | ~SymbolTableCollection ()=default |
template<typename T , typename NameT > | |
T | lookupSymbolIn (Operation *symbolTableOp, NameT &&name) |
virtual Operation * | lookupNearestSymbolFrom (Operation *from, StringAttr symbol) |
Returns the operation registered with the given symbol name within the closest parent operation of, or including, 'from' with the 'OpTrait::SymbolTable' trait. More... | |
virtual Operation * | lookupNearestSymbolFrom (Operation *from, SymbolRefAttr symbol) |
template<typename T > | |
T | lookupNearestSymbolFrom (Operation *from, StringAttr symbol) |
template<typename T > | |
T | lookupNearestSymbolFrom (Operation *from, SymbolRefAttr symbol) |
virtual void | invalidateSymbolTable (Operation *op) |
Invalidate the cached symbol table for an operation. More... | |
This class implements a lock-based shared wrapper around a symbol table collection that allows shared access to the collection of symbol tables.
This class does not protect shared access to individual symbol tables. SymbolTableCollection
lazily instantiates SymbolTable
instances for symbol table operations, making read operations not thread-safe. This class provides a thread-safe lookupSymbolIn
implementation by synchronizing the lazy SymbolTable
lookup.
Definition at line 351 of file SymbolTable.h.
|
inlineexplicit |
Definition at line 353 of file SymbolTable.h.
Operation * LockedSymbolTableCollection::lookupSymbolIn | ( | Operation * | symbolTableOp, |
FlatSymbolRefAttr | symbol | ||
) |
Look up a symbol with the specified name within the specified symbol table operation, returning null if no such name exists.
Definition at line 1014 of file SymbolTable.cpp.
References mlir::FlatSymbolRefAttr::getAttr(), and lookupSymbolIn().
|
inline |
Lookup a symbol of a particular kind within the specified symbol table, returning null if the symbol was not found.
Definition at line 371 of file SymbolTable.h.
References lookupSymbolIn().
|
overridevirtual |
Look up a symbol with the specified name within the specified symbol table operation, returning null if no such name exists.
Reimplemented from mlir::SymbolTableCollection.
Definition at line 1008 of file SymbolTable.cpp.
References mlir::SymbolTable::lookup().
Referenced by lookupSymbolIn().
|
overridevirtual |
Look up a potentially nested symbol within the specified symbol table operation, returning null if no such symbol exists.
Reimplemented from mlir::SymbolTableCollection.
Definition at line 1019 of file SymbolTable.cpp.
References mlir::remark::failed(), and lookupSymbolIn().
|
overridevirtual |
A variant of 'lookupSymbolIn' that returns all of the symbols referenced by a given SymbolRefAttr when resolved within the provided symbol table operation.
Returns failure if any of the nested references could not be resolved.
Reimplemented from mlir::SymbolTableCollection.
Definition at line 1027 of file SymbolTable.cpp.
References lookupSymbolIn(), and lookupSymbolInImpl().