summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopUnrollPass.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-09-09 20:02:23 +0000
committerOwen Anderson <resistor@mac.com>2010-09-09 20:02:23 +0000
commit547462b98cc0da6505ffafb1d47f0ed6f7518288 (patch)
tree566b2cf8432874ababcba8e10e40233913dc004b /lib/Transforms/Scalar/LoopUnrollPass.cpp
parentcc443c37eed4fca3ab592bb7bf16a3bf6ec6c510 (diff)
downloadllvm-547462b98cc0da6505ffafb1d47f0ed6f7518288.tar.gz
llvm-547462b98cc0da6505ffafb1d47f0ed6f7518288.tar.bz2
llvm-547462b98cc0da6505ffafb1d47f0ed6f7518288.tar.xz
Revert r113439, which relaxed the requirement that loops containing calls cannot be unrolled. After some discussion,
there seems to be a better way to achieve the same effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopUnrollPass.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopUnrollPass.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 4d23178174..7968939f11 100644
--- a/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -155,10 +155,8 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
unsigned LoopSize = ApproximateLoopSize(L, NumCalls);
DEBUG(dbgs() << " Loop Size = " << LoopSize << "\n");
if (NumCalls != 0) {
- // Even for a loop that contains calls, it can still be profitable to
- // unroll if the loop is really, REALLY small.
- DEBUG(dbgs() <<" Using lower threshold for loop with function calls.\n");
- CurrentThreshold = OptSizeUnrollThreshold;
+ DEBUG(dbgs() << " Not unrolling loop with function calls.\n");
+ return false;
}
uint64_t Size = (uint64_t)LoopSize*Count;
if (TripCount != 1 && Size > CurrentThreshold) {