Skip to content

Commit

Permalink
Revert r270518, which re-enabled "[LoopUnroll] Enable advanced unroll…
Browse files Browse the repository at this point in the history
…ing analysis by default.

Chromium builds are still hitting the assert in PR27874.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270577 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zmodem committed May 24, 2016
1 parent 93b640c commit 79d5d94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/Transforms/Scalar/LoopUnrollPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ static cl::opt<unsigned>
cl::desc("The baseline cost threshold for loop unrolling"));

static cl::opt<unsigned> UnrollPercentDynamicCostSavedThreshold(
"unroll-percent-dynamic-cost-saved-threshold", cl::init(50), cl::Hidden,
"unroll-percent-dynamic-cost-saved-threshold", cl::Hidden,
cl::desc("The percentage of estimated dynamic cost which must be saved by "
"unrolling to allow unrolling up to the max threshold."));

static cl::opt<unsigned> UnrollDynamicCostSavingsDiscount(
"unroll-dynamic-cost-savings-discount", cl::init(100), cl::Hidden,
"unroll-dynamic-cost-savings-discount", cl::Hidden,
cl::desc("This is the amount discounted from the total unroll cost when "
"the unrolled form has a high dynamic cost savings (triggered by "
"the '-unroll-perecent-dynamic-cost-saved-threshold' flag)."));

static cl::opt<unsigned> UnrollMaxIterationsCountToAnalyze(
"unroll-max-iteration-count-to-analyze", cl::init(10), cl::Hidden,
"unroll-max-iteration-count-to-analyze", cl::init(0), cl::Hidden,
cl::desc("Don't allow loop unrolling to simulate more than this number of"
"iterations when checking full unroll profitability"));

Expand Down
2 changes: 1 addition & 1 deletion test/Transforms/LoopUnroll/partial-unroll-const-bounds.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt < %s -S -unroll-threshold=20 -loop-unroll -unroll-allow-partial -unroll-runtime -unroll-dynamic-cost-savings-discount=0 | FileCheck %s
; RUN: opt < %s -S -unroll-threshold=20 -loop-unroll -unroll-allow-partial -unroll-runtime | FileCheck %s

; The Loop TripCount is 9. However unroll factors 3 or 9 exceed given threshold.
; The test checks that we choose a smaller, power-of-two, unroll count and do not give up on unrolling.
Expand Down

0 comments on commit 79d5d94

Please sign in to comment.