summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2016-05-10 21:45:55 +0000
committerHans Wennborg <hans@hanshq.net>2016-05-10 21:45:55 +0000
commit719b26ba54bbbed99249863a6800d61778962429 (patch)
tree7440071a6e0c617b9ddb2272b814789bdedce435 /llvm/lib
parent12de4aeeb304cb497557a2c1a544382de26031e6 (diff)
downloadbcm5719-llvm-719b26ba54bbbed99249863a6800d61778962429.tar.gz
bcm5719-llvm-719b26ba54bbbed99249863a6800d61778962429.zip
Loop unroller: set thresholds for optsize and minsize functions to zero
Before r268509, Clang would disable the loop unroll pass when optimizing for size. That commit enabled it to be able to support unroll pragmas in -Os builds. However, this regressed binary size in one of Chromium's DLLs with ~100 KB. This restores the original behaviour of no unrolling at -Os, but doing it in LLVM instead of Clang makes more sense, and also allows the pragmas to keep working. Differential revision: http://reviews.llvm.org/D20115 llvm-svn: 269124
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
index 2e5c55e73a4..95ec12d5cb8 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
@@ -111,9 +111,9 @@ static TargetTransformInfo::UnrollingPreferences gatherUnrollingPreferences(
UP.Threshold = 150;
UP.PercentDynamicCostSavedThreshold = 20;
UP.DynamicCostSavingsDiscount = 2000;
- UP.OptSizeThreshold = 50;
+ UP.OptSizeThreshold = 0;
UP.PartialThreshold = UP.Threshold;
- UP.PartialOptSizeThreshold = UP.OptSizeThreshold;
+ UP.PartialOptSizeThreshold = 0;
UP.Count = 0;
UP.MaxCount = UINT_MAX;
UP.FullUnrollMaxCount = UINT_MAX;
OpenPOWER on IntegriCloud