[Mlir-commits] [mlir] [mlir] Use getAttr to replace getInherentAttr in the test-symbol-uses pass (PR #172675)

Mehdi Amini llvmlistbot at llvm.org
Wed Dec 17 10:54:01 PST 2025


================
@@ -59,7 +59,7 @@ struct SymbolUsesPass
               symbolUse.getUser()->getParentOp(), symbolUse.getSymbolRef())) {
         symbolUse.getUser()->emitRemark()
             << "found use of symbol : " << symbolUse.getSymbolRef() << " : "
-            << *symbol->getInherentAttr(SymbolTable::getSymbolAttrName());
+            << symbol->getAttr(SymbolTable::getSymbolAttrName());
----------------
joker-eph wrote:

> I think there is something a bit incorrect, I don't know if I misunderstood. Accessing "launch_func" is done through walk "gpu. func". The walk function does not directly access " launch_func ", In the crash example, it first walked "func.func" and then "gpu.func".

I am not talking about launch_fun, the diff I sent above is unrelated to launch_func. It is about the method used to get the symbol ref and the use of the interface.

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


More information about the Mlir-commits mailing list