[Mlir-commits] [mlir] [MLIR][SCF] Sink scf.if from scf.while before region into after region. (PR #165216)
Mehdi Amini
llvmlistbot at llvm.org
Thu Nov 27 06:20:17 PST 2025
================
----------------
joker-eph wrote:
> You can question my guess, and you can also explain why there is no risk.
As mentioned before It's very difficult to prove or explain the absence of a problem when there is none. It's very easy to provide an example of a problem when it exists. So the onus is on you here.
> and it seems that other optimizations can hardly eliminate them.
You're introducing the concept of "dead values" here, I don't have a problem with these values existing. If you want to argue something you need to look at whether it affects liveness and live ranges, or how it is treated in a lowering pipeline: what happens with such a while loop when lowered to a CFG? Hopefully the logic is already smart enough to ignore these values, but it's possible we can do better (I don't see any fundamental issue here).
https://github.com/llvm/llvm-project/pull/165216
More information about the Mlir-commits
mailing list