[Mlir-commits] [mlir] [MLIR][RemoveDeadValues] Mark arguments of a public function Live (PR #160242)
Mehdi Amini
llvmlistbot at llvm.org
Thu Sep 25 02:48:41 PDT 2025
================
@@ -376,6 +383,31 @@ static void processFuncOp(FunctionOpInterface funcOp, Operation *module,
}
}
+static void processCallOp(CallOpInterface callOp, Operation *module,
+ RunLivenessAnalysis &la,
+ DenseSet<Value> &liveSet) {
+ auto callable = callOp.getCallableForCallee();
----------------
joker-eph wrote:
1) I fixed some issues recently to ensure that data-flow analysis based analyses and transformations honor the scope of the pass. I thought RemoveDeadValue was one of these, but it seems I got confused about it.
2) Actually I looked at the code and it may work in a subtle way today, we do in the `runOnFunction()`:
```
module->walk([&](Operation *op) {
if (auto funcOp = dyn_cast<FunctionOpInterface>(op)) {
processFuncOp(funcOp, module, la, deadVals, finalCleanupList);
```
If the pass is scheduled on a `func.func`, then this walk does not start on the module (despite the variable name) but on the function. And so it'll never visit the func.func itself and the processFuncOp won't be called.
https://github.com/llvm/llvm-project/pull/160242
More information about the Mlir-commits
mailing list