MLIR  15.0.0git
mlir::SymbolUserMap Class Reference

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'. More...

ArrayRef< Operation * > getUsers (Operation *symbol) const
Return the users of the provided symbol operation. More...

bool useEmpty (Operation *symbol) const
Return true if the given symbol has no uses. More...

void replaceAllUsesWith (Operation *symbol, StringAttr newSymbolName)
Replace all of the uses of the given symbol with newSymbolName. More...

Detailed Description

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 290 of file SymbolTable.h.

◆ SymbolUserMap()

 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 1039 of file SymbolTable.cpp.

◆ getUsers()

 ArrayRef mlir::SymbolUserMap::getUsers ( Operation * symbol ) const
inline

Return the users of the provided symbol operation.

Definition at line 299 of file SymbolTable.h.

Referenced by funcsToCoroutines().

◆ replaceAllUsesWith()

 void SymbolUserMap::replaceAllUsesWith ( Operation * symbol, StringAttr newSymbolName )

Replace all of the uses of the given symbol with newSymbolName.

Definition at line 1064 of file SymbolTable.cpp.

◆ useEmpty()

 bool mlir::SymbolUserMap::useEmpty ( Operation * symbol ) const
inline

Return true if the given symbol has no uses.

Definition at line 305 of file SymbolTable.h.

References mlir::detail::verifySymbol(), and mlir::detail::verifySymbolTable().

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