diff options
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 5d80b75a27..c6f02e8978 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -34,7 +34,6 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Target/TargetLowering.h" #include <algorithm> @@ -47,12 +46,6 @@ STATISTIC(NumVariable, "Number of PHIs with variable strides"); STATISTIC(NumEliminated , "Number of strides eliminated"); namespace { - // Hidden options for help debugging. - cl::opt<bool> AllowPHIIVReuse("lsr-allow-phi-iv-reuse", - cl::init(true), cl::Hidden); -} - -namespace { struct BasedUser; @@ -997,11 +990,8 @@ bool LoopStrengthReduce::ValidStride(bool HasBaseReg, AccessTy = SI->getOperand(0)->getType(); else if (LoadInst *LI = dyn_cast<LoadInst>(UsersToProcess[i].Inst)) AccessTy = LI->getType(); - else if (isa<PHINode>(UsersToProcess[i].Inst)) { - if (AllowPHIIVReuse) - continue; - return false; - } + else if (isa<PHINode>(UsersToProcess[i].Inst)) + continue; TargetLowering::AddrMode AM; if (SCEVConstant *SC = dyn_cast<SCEVConstant>(UsersToProcess[i].Imm)) @@ -1189,7 +1179,7 @@ SCEVHandle LoopStrengthReduce::CollectIVUsers(const SCEVHandle &Stride, } // If this use isn't an address, then not all uses are addresses. - if (!isAddress && !(AllowPHIIVReuse && isPHI)) + if (!isAddress && !isPHI) AllUsesAreAddresses = false; MoveImmediateValues(TLI, UsersToProcess[i].Inst, UsersToProcess[i].Base, |