Enable redundant phi elimination after LSR.
authorAndrew Trick <atrick@apple.com>
Sat, 7 Jan 2012 07:08:17 +0000 (07:08 +0000)
committerAndrew Trick <atrick@apple.com>
Sat, 7 Jan 2012 07:08:17 +0000 (07:08 +0000)
This will be more important as we extend the LSR pass in ways that don't rely on the formula solver. In particular, we need it for constructing IV chains.

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

lib/Transforms/Scalar/LoopStrengthReduce.cpp

index 8f3a5ab071c610cb538627dbdb1591ea9776816c..c61714d3ffbe3a0d451b22da87352ed910d403bf 100644 (file)
@@ -86,8 +86,10 @@ static cl::opt<bool> EnableRetry(
 // Temporary flag to cleanup congruent phis after LSR phi expansion.
 // It's currently disabled until we can determine whether it's truly useful or
 // not. The flag should be removed after the v3.0 release.
 // Temporary flag to cleanup congruent phis after LSR phi expansion.
 // It's currently disabled until we can determine whether it's truly useful or
 // not. The flag should be removed after the v3.0 release.
+// This is now needed for ivchains.
 static cl::opt<bool> EnablePhiElim(
 static cl::opt<bool> EnablePhiElim(
-  "enable-lsr-phielim", cl::Hidden, cl::desc("Enable LSR phi elimination"));
+  "enable-lsr-phielim", cl::Hidden, cl::init(true),
+  cl::desc("Enable LSR phi elimination"));
 
 namespace {
 
 
 namespace {