[llvm] Swap UnrollAndJam Pass to before the SLP Vectorizer Pass (PR #97029)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 09:23:16 PDT 2024
nikic wrote:
Compile-time:
Enabling unroll&jam: http://llvm-compile-time-tracker.com/compare.php?from=0606c64da8b73768aded766b11e37fd77365e39d&to=a8ac00e6e982c9ecde796ebeb39e258fd12e759a&stat=instructions:u
Moving the position: http://llvm-compile-time-tracker.com/compare.php?from=a8ac00e6e982c9ecde796ebeb39e258fd12e759a&to=581c57bc463076c736abca8fcf16b74143c10d33&stat=instructions:u
As you can see, the new position is a lot more expensive (and would prevent future default enablement). Two things I notice:
* With full LTO, you are now running unroll&jam twice -- I assume that's not intentional and you want a `!IsFullLTO` condition?
* In the new position, we get less analysis reuse -- most importantly I expect that this recomputes SCEV. Possibly moving the pass to a different position before SLP would give better results (e.g. directly after LoopVectorize? I don't know.)
Can't really comment on the change itself, as I'm not familiar with the pass.
https://github.com/llvm/llvm-project/pull/97029
More information about the llvm-commits
mailing list