[llvm-commits] [llvm] r48556 - in /llvm/trunk/lib/Transforms/Scalar: CodeGenPrepare.cpp LoopStrengthReduce.cpp

Evan Cheng evan.cheng at apple.com
Wed Mar 19 15:02:27 PDT 2008


Author: evancheng
Date: Wed Mar 19 17:02:26 2008
New Revision: 48556

URL: http://llvm.org/viewvc/llvm-project?rev=48556&view=rev
Log:
Remove dead options.

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

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=48556&r1=48555&r2=48556&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Wed Mar 19 17:02:26 2008
@@ -30,17 +30,11 @@
 #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 @@
         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);

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=48556&r1=48555&r2=48556&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Mar 19 17:02:26 2008
@@ -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(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 @@
       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 @@
       }
 
       // 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,





More information about the llvm-commits mailing list