|
FLANG
|
#include <flang/Optimizer/Support/LazySymbolTable.h>
Public Member Functions | |
| LazySymbolTable (mlir::Operation *op) | |
| void | build () |
| template<typename T> | |
| T | lookup (llvm::StringRef name) |
| Look up a symbol by name. Builds the table on first use. | |
| mlir::Operation * | lookupSymbol (mlir::SymbolRefAttr attr) |
Helper to only build the symbol table when needed. Use this when performing symbol lookups inside a module walk to avoid O(n) lookups per op and pseudo-quadratic behavior in large modules.
|
inline |
Look up a symbol by SymbolRefAttr (uses root reference). Returns nullptr if attr is null, the module is invalid, or the symbol is not found.