aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/LoopUnrollPass.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-09-29 18:05:19 +0000
committerOwen Anderson <resistor@mac.com>2010-09-29 18:05:19 +0000
commit69daca59fff6c1275a52eb7d32948a88200a1807 (patch)
treecf3b5cb98b6ca53db9bd91f148d0fcda33ce375f /lib/Transforms/Scalar/LoopUnrollPass.cpp
parent1619beb4e2edb69aeb78cd2338a00dc201974f89 (diff)
downloadexternal_llvm-69daca59fff6c1275a52eb7d32948a88200a1807.zip
external_llvm-69daca59fff6c1275a52eb7d32948a88200a1807.tar.gz
external_llvm-69daca59fff6c1275a52eb7d32948a88200a1807.tar.bz2
Revert r114919, which caused some serious regressions on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnrollPass.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopUnrollPass.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 99a38b1..7da2b52 100644
--- a/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -158,12 +158,7 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
DEBUG(dbgs() << " Not unrolling loop with inlinable calls.\n");
return false;
}
-
- // NOTE: We multiply by the loop depth because unrolling inner loops of
- // very deep nests tends to result in high register pressure, which we don't
- // currently recover from very well. When and if the register allocator/
- // spiller improves to compensate, this should be re-evaluated.
- uint64_t Size = (uint64_t)LoopSize*Count*L->getLoopDepth();
+ uint64_t Size = (uint64_t)LoopSize*Count;
if (TripCount != 1 && Size > CurrentThreshold) {
DEBUG(dbgs() << " Too large to fully unroll with count: " << Count
<< " because size: " << Size << ">" << CurrentThreshold << "\n");