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

Mehdi Amini llvmlistbot at llvm.org
Fri Sep 26 05:36:23 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:

>  it's not "callers we can't visit". It's the other way around.

I don't follow what you mean?

"callers we can't visit" refers to the fact that a public function has callees outside of the current module: i.e. you can't visit them (and so you can't update them).

> If a callee is public, we can't change its function signature.

Yes, but the the part about "callers we can't visit" is explaining "why" we can't change the signature.

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


More information about the Mlir-commits mailing list