FLANG
fir::LazySymbolTable Class Reference

#include <flang/Optimizer/Support/LazySymbolTable.h>

Public Member Functions

 LazySymbolTable (mlir::Operation *op)
void build ()
template<typename T>
lookup (llvm::StringRef name)
 Look up a symbol by name. Builds the table on first use.
mlir::Operation * lookupSymbol (mlir::SymbolRefAttr attr)

Detailed Description

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.

Member Function Documentation

◆ lookupSymbol()

mlir::Operation * fir::LazySymbolTable::lookupSymbol ( mlir::SymbolRefAttr attr)
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.


The documentation for this class was generated from the following file: