MLIR
15.0.0git
|
This class represents a collection of SymbolTable
s.
More...
#include "mlir/IR/SymbolTable.h"
Public Member Functions | |
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) const |
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 represents a collection of SymbolTable
s.
This simplifies certain algorithms that run recursively on nested symbol tables. Symbol tables are constructed lazily to reduce the upfront cost of constructing unnecessary tables.
Definition at line 242 of file SymbolTable.h.
SymbolTable & SymbolTableCollection::getSymbolTable | ( | Operation * | op | ) |
Lookup, or create, a symbol table for an operation.
Definition at line 1028 of file SymbolTable.cpp.
Returns the operation registered with the given symbol name within the closest parent operation of, or including, 'from' with the 'OpTrait::SymbolTable' trait.
Returns nullptr if no valid symbol was found.
Definition at line 1015 of file SymbolTable.cpp.
References mlir::SymbolTable::getNearestSymbolTable(), and mlir::SymbolTable::lookupSymbolIn().
Referenced by parseGlobalMemrefOpTypeAndInitialValue(), printAtomicReductionRegion(), verifySymbolAttrUse(), and walkReferencedSymbolNodes().
Operation * SymbolTableCollection::lookupNearestSymbolFrom | ( | Operation * | from, |
SymbolRefAttr | symbol | ||
) |
Definition at line 1021 of file SymbolTable.cpp.
References mlir::SymbolTable::getNearestSymbolTable(), and mlir::SymbolTable::lookupSymbolIn().
|
inline |
Definition at line 267 of file SymbolTable.h.
References mlir::SymbolTable::lookupNearestSymbolFrom().
|
inline |
Definition at line 271 of file SymbolTable.h.
References mlir::SymbolTable::lookupNearestSymbolFrom().
Look up a symbol with the specified name within the specified symbol table operation, returning null if no such name exists.
Definition at line 987 of file SymbolTable.cpp.
Referenced by mlir::SymbolUserMap::replaceAllUsesWith(), and mlir::SymbolUserMap::SymbolUserMap().
Definition at line 991 of file SymbolTable.cpp.
References mlir::failed(), and mlir::SymbolTable::lookupSymbolIn().
|
inline |
Definition at line 249 of file SymbolTable.h.
References mlir::SymbolTable::lookupNearestSymbolFrom(), and mlir::SymbolTable::lookupSymbolIn().
LogicalResult SymbolTableCollection::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.
A variant of 'lookupSymbolIn' that returns all of the symbols referenced by a given SymbolRefAttr.
Returns failure if any of the nested references could not be resolved.
Definition at line 1002 of file SymbolTable.cpp.
References mlir::SymbolTable::lookupSymbolIn(), and lookupSymbolInImpl().