[PATCH] D23891: [LoopUnroll] Check partial unrolling is enabled before initialization. NFC.
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 11:49:28 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL285330: [LoopUnroll] Check partial unrolling is enabled before initialization. NFC. (authored by haicheng).
Changed prior to commit:
https://reviews.llvm.org/D23891?vs=69287&id=76079#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23891
Files:
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Index: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -803,15 +803,15 @@
// 4rd priority is partial unrolling.
// Try partial unroll only when TripCount could be staticaly calculated.
if (TripCount) {
- if (UP.Count == 0)
- UP.Count = TripCount;
UP.Partial |= ExplicitUnroll;
if (!UP.Partial) {
DEBUG(dbgs() << " will not try to unroll partially because "
<< "-unroll-allow-partial not given\n");
UP.Count = 0;
return false;
}
+ if (UP.Count == 0)
+ UP.Count = TripCount;
if (UP.PartialThreshold != NoThreshold) {
// Reduce unroll count to be modulo of TripCount for partial unrolling.
UnrolledSize = (uint64_t)(LoopSize - BEInsns) * UP.Count + BEInsns;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23891.76079.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/9f753a3e/attachment.bin>
More information about the llvm-commits
mailing list