[Mlir-commits] [mlir] [MLIR][LivenessAnalysis] Treat a public function as an external (PR #160648)

Mehdi Amini llvmlistbot at llvm.org
Thu Sep 25 03:06:40 PDT 2025


================
@@ -503,12 +504,18 @@ AbstractSparseBackwardDataFlowAnalysis::visitOperation(Operation *op) {
       // If the call invokes an external function (or a function treated as
       // external due to config), defer to the corresponding extension hook.
       // By default, it just does `visitCallOperand` for all operands.
+      //
+      // If callable is a public function, treat it as an external function.
+      // Transforms like RemoveDeadValues cannot change the arguments or returns
+      // of it.
----------------
joker-eph wrote:

```suggestion
      // This is because a public function has potential callers we can't
      // visit, and thus we need to be conservative and consider all 
      // arguments live.
```

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


More information about the Mlir-commits mailing list