[PATCH] D44983: [LoopUnroll] Only peel if a predicate becomes known in the loop body.
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 29 03:21:26 PDT 2018
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:200
+ // or !Pred in the loop body statically.
+ unsigned NewPeelCount = DesiredPeelCount;
+
----------------
BTW, I just realized that this entire optimization will be harmful if the predicate is provable for `LeftAR, RightSCEV`. In this case, something is true on EVERY iteration, and you peel out SOME iterations thinking that it would be profitable.
Isn't it the real problem you are trying to win here?
https://reviews.llvm.org/D44983
More information about the llvm-commits
mailing list