|
MLIR 24.0.0git
|
This class represents a map of symbols to users, and provides efficient implementations of symbol queries related to users; such as collecting the users of a symbol, replacing all uses, etc. More...
#include "mlir/IR/SymbolTable.h"
Public Member Functions | |
| SymbolUserMap (SymbolTableCollection &symbolTable, Operation *symbolTableOp) | |
| Build a user map for all of the symbols defined in regions nested under 'symbolTableOp'. | |
| ArrayRef< Operation * > | getUsers (Operation *symbol) const |
| Return the users of the provided symbol operation within this map's scope. | |
| bool | areAllUsesVisible (Operation *symbol) const |
| Return true if all uses of the symbol within the IR are within this scope. | |
| bool | useEmpty (Operation *symbol) const |
| Return true if the given symbol has no uses within this map's scope. | |
| void | replaceAllUsesWith (Operation *symbol, StringAttr newSymbolName) |
| Replace all uses of the symbol within this map's scope with newSymbolName. | |
This class represents a map of symbols to users, and provides efficient implementations of symbol queries related to users; such as collecting the users of a symbol, replacing all uses, etc.
Definition at line 403 of file SymbolTable.h.
| SymbolUserMap::SymbolUserMap | ( | SymbolTableCollection & | symbolTable, |
| Operation * | symbolTableOp ) |
Build a user map for all of the symbols defined in regions nested under 'symbolTableOp'.
A reference to the provided symbol table collection is kept by the user map to ensure efficient lookups, thus the lifetime should extend beyond that of this map.
Definition at line 1050 of file SymbolTable.cpp.
References mlir::Operation::getBlock(), mlir::Region::getOps(), mlir::Operation::getRegion(), mlir::SymbolTable::getSymbolUses(), and mlir::SymbolTable::walkSymbolTables().
Return true if all uses of the symbol within the IR are within this scope.
The symbol must belong to this map's scope.
Definition at line 1078 of file SymbolTable.cpp.
Return the users of the provided symbol operation within this map's scope.
Definition at line 412 of file SymbolTable.h.
Replace all uses of the symbol within this map's scope with newSymbolName.
Definition at line 1085 of file SymbolTable.cpp.
References mlir::Operation::getParentOp(), and mlir::SymbolTable::replaceAllSymbolUses().
Return true if the given symbol has no uses within this map's scope.
Definition at line 423 of file SymbolTable.h.