[llvm] r360444 - [LSR] Tweak setup cost depth threshold to 10.

Amara Emerson via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 10:29:35 PDT 2019


Author: aemerson
Date: Fri May 10 10:29:35 2019
New Revision: 360444

URL: http://llvm.org/viewvc/llvm-project?rev=360444&view=rev
Log:
[LSR] Tweak setup cost depth threshold to 10.

The original change introduced a depth limit of 7 which caused a 22% regression
in the Swift MapReduceLazyCollection & Ackermann benchmarks. This new threshold
still ensures that the original test case doesn't hang.

rdar://50359639

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=360444&r1=360443&r2=360444&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri May 10 10:29:35 2019
@@ -165,7 +165,7 @@ static cl::opt<unsigned> ComplexityLimit
   cl::desc("LSR search space complexity limit"));
 
 static cl::opt<unsigned> SetupCostDepthLimit(
-    "lsr-setupcost-depth-limit", cl::Hidden, cl::init(7),
+    "lsr-setupcost-depth-limit", cl::Hidden, cl::init(10),
     cl::desc("The limit on recursion depth for LSRs setup cost"));
 
 #ifndef NDEBUG




More information about the llvm-commits mailing list