]> granicus.if.org Git - llvm/commitdiff
[LSR] Tweak setup cost depth threshold to 10.
authorAmara Emerson <aemerson@apple.com>
Fri, 10 May 2019 17:29:35 +0000 (17:29 +0000)
committerAmara Emerson <aemerson@apple.com>
Fri, 10 May 2019 17:29:35 +0000 (17:29 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360444 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopStrengthReduce.cpp

index 768860140e6d3f92cfc9c3fb72dd27a5c3b7f857..9247ae35adbf25099ec9727ef6642636f7d6760e 100644 (file)
@@ -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