[PATCH] D21720: Unroll for uncountable loops
Michael Zolotukhin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 11:19:48 PST 2017
mzolotukhin added a comment.
What is the case 1?
For loops with unknown trip count (that's the case 2, right?) I don't see why we need to add any additional analyzers (`analyzeLoopUnrollCost`). Removing one instruction by unrolling by 2 is not better than the worst case for partial unroll of a loop with a known trip count:
for (i = 0; i < N; i++) {
...
}
But since we sometimes partially unroll such loops, I don't currently see a reason why we can't do this for loops with unknown trip-count as well. However, we don't need additional thresholds/knobs for it, thresholds for partial unroll should do it already.
Repository:
rL LLVM
https://reviews.llvm.org/D21720
More information about the llvm-commits
mailing list