From 3c11b7d25785a9a27b6465db8157b75aaf129a6e Mon Sep 17 00:00:00 2001 From: Michael Zolotukhin Date: Fri, 3 Jun 2016 00:16:46 +0000 Subject: [PATCH] [LoopUnroll] Set correct thresholds for new recently enabled unrolling heuristic. In r270478, where I enabled the new heuristic I posted testing results, which I got when explicitly passed the thresholds values via CL options. However, setting the CL options init-values is not enough to change the default values of thresholds, so I'm changing them in another place now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271615 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopUnrollPass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/LoopUnrollPass.cpp b/lib/Transforms/Scalar/LoopUnrollPass.cpp index 95fd35525e9..ddc1c60d93e 100644 --- a/lib/Transforms/Scalar/LoopUnrollPass.cpp +++ b/lib/Transforms/Scalar/LoopUnrollPass.cpp @@ -114,8 +114,8 @@ static TargetTransformInfo::UnrollingPreferences gatherUnrollingPreferences( // Set up the defaults UP.Threshold = 150; - UP.PercentDynamicCostSavedThreshold = 20; - UP.DynamicCostSavingsDiscount = 2000; + UP.PercentDynamicCostSavedThreshold = 50; + UP.DynamicCostSavingsDiscount = 100; UP.OptSizeThreshold = 0; UP.PartialThreshold = UP.Threshold; UP.PartialOptSizeThreshold = 0;