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

xin liu llvmlistbot at llvm.org
Tue Sep 30 10:25:49 PDT 2025


navyxliu wrote:


> > The problem is whether it is always possible to find cheaper replacement? What about an aggregated type?
> 
> It may not always be possible, but it's always safe to do nothing.
> 
> > if we fail, we need to propagate live arguments in RemoveDeadValues just like PR #160242
> 
> Right seems like it may be better handled there: that is "not-live" != "removable" here.

So I drop this and continue working on https://github.com/llvm/llvm-project/pull/160242? 

Allow me to summarize the idea:  We intercept callOp whose target is public. We iterate its parameters: 

If liveness analysis is **intra-procedural** or the parameter is NonLive but we manage to find an alternative: do nothing. 
Otherwise, we mark the corresponding argument in caller Live. We propagate liveness backward. 



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


More information about the Mlir-commits mailing list