MLIR
20.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) |
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) |
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) |
A variant of 'lookupSymbolIn' that returns all of the symbols referenced by a given SymbolRefAttr when resolved within the provided symbol table operation. More... | |
Public Member Functions inherited from mlir::SymbolTableCollection | |
Operation * | lookupSymbolIn (Operation *symbolTableOp, StringAttr 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) |
template<typename T , typename NameT > | |
T | lookupSymbolIn (Operation *symbolTableOp, NameT &&name) |
LogicalResult | lookupSymbolIn (Operation *symbolTableOp, SymbolRefAttr name, SmallVectorImpl< Operation * > &symbols) |
A variant of 'lookupSymbolIn' that returns all of the symbols referenced by a given SymbolRefAttr when resolved within the provided symbol table operation. More... | |
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... | |
Operation * | lookupNearestSymbolFrom (Operation *from, SymbolRefAttr symbol) |
template<typename T > | |
T | lookupNearestSymbolFrom (Operation *from, StringAttr symbol) |
template<typename T > | |
T | lookupNearestSymbolFrom (Operation *from, SymbolRefAttr symbol) |
SymbolTable & | getSymbolTable (Operation *op) |
Lookup, or create, a 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 337 of file SymbolTable.h.
|
inlineexplicit |
Definition at line 339 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 1007 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 355 of file SymbolTable.h.
References lookupSymbolIn().
Operation * LockedSymbolTableCollection::lookupSymbolIn | ( | Operation * | symbolTableOp, |
StringAttr | 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 1001 of file SymbolTable.cpp.
References mlir::SymbolTable::lookup().
Referenced by lookupSymbolIn().
Operation * LockedSymbolTableCollection::lookupSymbolIn | ( | Operation * | symbolTableOp, |
SymbolRefAttr | name | ||
) |
Look up a potentially nested symbol within the specified symbol table operation, returning null if no such symbol exists.
Definition at line 1012 of file SymbolTable.cpp.
References lookupSymbolIn().
LogicalResult LockedSymbolTableCollection::lookupSymbolIn | ( | Operation * | symbolTableOp, |
SymbolRefAttr | name, | ||
SmallVectorImpl< Operation * > & | symbols | ||
) |
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.
Definition at line 1020 of file SymbolTable.cpp.
References lookupSymbolIn(), and lookupSymbolInImpl().