diff options
author | Owen Anderson <resistor@mac.com> | 2010-09-09 20:02:23 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-09-09 20:02:23 +0000 |
commit | 6270515918a16f30e081d59fe54a8d87010d4174 (patch) | |
tree | f8a72e46a69fbcc3c906a9f91f12283e6f9e3d30 /llvm/lib | |
parent | 11ab204fdc52033520e8690b02c27380a243f2ab (diff) | |
download | bcm5719-llvm-6270515918a16f30e081d59fe54a8d87010d4174.tar.gz bcm5719-llvm-6270515918a16f30e081d59fe54a8d87010d4174.zip |
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.
llvm-svn: 113528
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp index 4d23178174b..7968939f11d 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/llvm/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) { |