[llvm] [LoopUnroll] Rotate loop to make it countable for runtime unrolling (PR #146540)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 9 06:38:07 PDT 2025
https://github.com/annamthomas commented:
@mark-sed: some comments inline.
Also, for reviewers (cc @fhahn , @nikic) : this MR is to show how rotation helps to runtime-unroll more loops.
We can either do the following:
- review this MR as-is with the filter function as the code being checked and no other changes in loop-rotation.
- refactor the rotation code to separate out legality and profitability checks. Instead of the filter function, we can then pass in the profitability check required by runtime-unrolling.
However, before going one way or the other, we want to get some thoughts on any preferences, alternate approaches etc.
As a side note: In both cases, this profitability check through runtime-unrolling will also include that loop is in simplified form, so that we reduce the number of cases where rotation was done without unrolling.
https://github.com/llvm/llvm-project/pull/146540
More information about the llvm-commits
mailing list