[Mlir-commits] [mlir] [MLIR][RemoveDeadValues] Mark arguments of a public function Live (PR #160242)

Andrew Luo llvmlistbot at llvm.org
Thu Sep 25 08:01:46 PDT 2025


================
@@ -376,6 +384,31 @@ static void processFuncOp(FunctionOpInterface funcOp, Operation *module,
   }
 }
 
+static void processCallOp(CallOpInterface callOp, Operation *module,
+                          RunLivenessAnalysis &la, DenseSet<Value> &liveSet) {
+  auto callable = callOp.getCallableForCallee();
+
+  if (auto symbolRef = callable.dyn_cast<SymbolRefAttr>()) {
----------------
AndrewZhaoLuo wrote:

to reduce nesting here i suggest checking the negation and returning early:

```
auto symbolRef = ...
if (!symbolRef)
    return;
```

```
if (!funcOp.isPublic())
   return;
```

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


More information about the Mlir-commits mailing list