[PATCH] D123865: [LoopPeel] Allow partial unrolling for profile-based peeling

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 11:18:13 PDT 2022


ikudrin added a comment.

In D123865#3454386 <https://reviews.llvm.org/D123865#3454386>, @davidxl wrote:

> For loops with trip count between maxPeelCount and 2*maxPeelCount, this patch enables partial peeling of the loop for maxPeelCount iterations. This feels very aggressive and can be detrimental to performance: 1) increased icache footprint; 2) more pressure to BPU and 3) the back branch of the remaining loop may become less predictable.
>
> What is the motivation case for such a change?

I've described the motivation in my first comment. I believe that the concerns are the same for any peeling strategy based on the trip count. And if there is a consensus that a loop with 7 trip counts can be optimized, why 8-trip-count loop can't be optimized in the same way? So, the patch provides a smooth transition between what is optimized and what is not. That should work better than a strict border.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123865/new/

https://reviews.llvm.org/D123865



More information about the llvm-commits mailing list