[llvm] [LoopInterchange] Consider eligible inner subnests (PR #214920)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 23:31:59 PDT 2026
MattPD wrote:
This change comes from performance work on SPEC CPU2000 `171.swim` compiled
with Flang.
In
[#140182](https://github.com/llvm/llvm-project/pull/140182#issuecomment-2886739545),
sebpop reported that `swim` does not interchange because LLVM cannot infer the
loop iteration counts. This PR does not fix that blocker. It addresses a
different blocker in the same benchmark: LoopInterchange gives up when the
complete outermost nest is unsuitable for the whole-nest path, even when a
parent loop and its leaf child form a legal, profitable pair.
A design walkthrough explains how the benchmark motivates the change and how
the fallback added here works:
https://gist.github.com/MattPD/a2910ca82c86333dba0181a29bf79526
https://github.com/llvm/llvm-project/pull/214920
More information about the llvm-commits
mailing list