[PATCH] D138232: [NFC] Refactor loop peeling code for calculating phi invariance.

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 10:44:07 PST 2022


jamieschmeiser marked an inline comment as done.
jamieschmeiser added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:118
+//       else
+//         g(2);
+//       g(x);
----------------
mkazantsev wrote:
> If it wasn't your intention, please change condition `i > 10` here, otherwise we can say that it's (maybe) also profitable to peel off 10 iterations to get rid of this check (and it might be even more important than what are you describing).
I have removed this as it isn't germane to the example.  I think I originally had it in to avoid partial loop unrolling, which I think is attempted before peeling


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

https://reviews.llvm.org/D138232



More information about the llvm-commits mailing list