[Mlir-commits] [mlir] [MLIR][LivenessAnalysis] Treat a public function as an external (PR #160648)
xin liu
llvmlistbot at llvm.org
Thu Sep 25 20:34:03 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.
----------------
navyxliu wrote:
Sorry, but I still don't think the message is accurate. it's not "callers we can't visit". It's the other way around.
If a callee is public, we can't change its function signature.
if we delete d, we need to change the function signature, or figure out how to replace d with something cheaper than that.
```
public void foo(%unused : i32)
void bar() {
int d = computation();
foo(d);
}
```
Could you take a look my new message?
https://github.com/llvm/llvm-project/pull/160648
More information about the Mlir-commits
mailing list