[Mlir-commits] [mlir] [MLIR][SCF] Sink scf.if from scf.while before region into after region. (PR #165216)
Mehdi Amini
llvmlistbot at llvm.org
Wed Nov 26 08:56:21 PST 2025
================
----------------
joker-eph wrote:
> I find it hard to accept the statement. Does this mean that your transformations may also produce dead values that cannot be eliminated?
> Have you considered extreme cases or stress tests? Or could this actually be a hidden optimization bug that simply hasn’t been discovered yet?
> Subjectively, I feel that adding result values to scf.while may introduce negative optimization effects. Maybe I just don’t understand it well enough — can you explain why it wouldn’t cause any negative optimization?
I don't see any issue with what you call "dead values" here. But let's not reverse the burden of explanation: if you claim that this is a problem, it's up to you to provide an example (you just need one), not the opposite actually (I can't provide an example for the absence of something in general...).
> If I can guarantee that it always results in a positive optimization, then I think it’s fine to use it in canonicalization.
I was trying to provide you with a way to make progress right now to land your change, I suspect we may not converge on this PR right now.
https://github.com/llvm/llvm-project/pull/165216
More information about the Mlir-commits
mailing list