[Mlir-commits] [mlir] [mlir][SymbolTable] Handle unknown symbol users in SymbolUserMap (PR #227918)

Vinicius Silva llvmlistbot at llvm.org
Fri Oct 2 06:10:18 PDT 2026


================
@@ -1076,6 +1082,12 @@ SymbolUserMap::SymbolUserMap(SymbolTableCollection &symbolTable,
 }
 
 bool SymbolUserMap::areAllUsesVisible(Operation *symbol) const {
+  for (Operation *parent = symbol->getParentOp(); parent;
+       parent = parent->getParentOp()) {
+    if (symbolTablesWithUnknownUsers.contains(parent)) {
+      return false;
+    }
+  }
----------------
viniciusfdasilva wrote:

That's a good point. The DenseSet is only populated when SymbolTable::getSymbolUses() returns nullopt, so for the usual case where all symbol uses can be computed, it remains empty. But I'm free to hear suggestions about another way to fix the issue #226052 :)

https://github.com/llvm/llvm-project/pull/227918


More information about the Mlir-commits mailing list