Remove dead options.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 19 Mar 2008 22:02:26 +0000 (22:02 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 19 Mar 2008 22:02:26 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48556 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/CodeGenPrepare.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp

index d8b82b374dcecc6e3f1c53cf751e904ffacffbfb..8762d3dd1bcb57fe13ed04952c7c33ad00a706e8 100644 (file)
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/CallSite.h"
-#include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/GetElementPtrTypeIterator.h"
 using namespace llvm;
 
-namespace {
-  cl::opt<bool> OptExtUses("optimize-ext-uses",
-                           cl::init(true), cl::Hidden);
-}
-
 namespace {  
   class VISIBILITY_HIDDEN CodeGenPrepare : public FunctionPass {
     /// TLI - Keep a pointer of a TargetLowering to consult for determining
@@ -1098,7 +1092,7 @@ bool CodeGenPrepare::OptimizeBlock(BasicBlock &BB) {
         MadeChange |= Change;
       }
 
-      if (OptExtUses && !Change && (isa<ZExtInst>(I) || isa<SExtInst>(I)))
+      if (!Change && (isa<ZExtInst>(I) || isa<SExtInst>(I)))
         MadeChange |= OptimizeExtUses(I);
     } else if (CmpInst *CI = dyn_cast<CmpInst>(I)) {
       MadeChange |= OptimizeCmpExpression(CI);
index 5d80b75a274ae1d02a8974a57150dbaa73272b24..c6f02e8978c8e72ed4659540217e20d989ec1537 100644 (file)
@@ -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>
@@ -46,12 +45,6 @@ STATISTIC(NumInserted,    "Number of PHIs inserted");
 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,