[PATCH] D31613: [LoopPeeling] Get rid of Phis that become invariant after N steps
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 05:49:58 PDT 2017
mkazantsev marked 10 inline comments as done.
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:165
+ DesiredPeelCount = std::min(DesiredPeelCount, MaxPeelCount);
+ assert(DesiredPeelCount > 0 && "Wrong loop size estimation?");
+ DEBUG(dbgs() << "Peel " << DesiredPeelCount << " iteration(s) to get rid"
----------------
mkazantsev wrote:
> sanjoy wrote:
> > Can `UP.Threshold` be `0` (say it was directly set by the user by `UnrollThreshold`)?
> Only if loop size is also 0, we enter here witn condition 2 * LoopSize <= UP.Threshold :) So I Don't think it's real.
Line 131 rejects empty loops:
if (!L->empty())
return;
https://reviews.llvm.org/D31613
More information about the llvm-commits
mailing list