[llvm-commits] [llvm] r60725 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

Chris Lattner sabre at nondot.org
Mon Dec 8 14:44:08 PST 2008


Author: lattner
Date: Mon Dec  8 16:44:07 2008
New Revision: 60725

URL: http://llvm.org/viewvc/llvm-project?rev=60725&view=rev
Log:
remove DebugIterations option.  Despite the accusations, 
jump threading has been shown to only expose problems not
have bugs itself.  I'm sure it's completely bug free! ;-)

Modified:
    llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp

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

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Mon Dec  8 16:44:07 2008
@@ -36,11 +36,6 @@
           cl::desc("Max block size to duplicate for jump threading"),
           cl::init(6), cl::Hidden);
 
-static cl::opt<int>
-DebugIterations("jump-threading-debug",
-                cl::desc("Stop jump threading after N iterations"),
-                cl::init(-1), cl::Hidden);
-
 namespace {
   /// This pass performs 'jump threading', which looks at blocks that have
   /// multiple predecessors and multiple successors.  If one or more of the
@@ -110,15 +105,11 @@
       // If the block is trivially dead, zap it.  This eliminates the successor
       // edges which simplifies the CFG.
       if (pred_begin(BB) == pred_end(BB) &&
-          BB != &BB->getParent()->getEntryBlock() &&
-          DebugIterations != 0) {
+          BB != &BB->getParent()->getEntryBlock()) {
         DOUT << "  JT: Deleting dead block '" << BB->getNameStart()
              << "' with terminator: " << *BB->getTerminator();
         DeleteDeadBlock(BB);
         Changed = true;
-        
-        if (DebugIterations != -1)
-          DebugIterations = DebugIterations-1;
       }
     }
     AnotherIteration = Changed;
@@ -193,10 +184,6 @@
 /// ProcessBlock - If there are any predecessors whose control can be threaded
 /// through to a successor, transform them now.
 bool JumpThreading::ProcessBlock(BasicBlock *BB) {
-  if (DebugIterations == 0) return false;
-  if (DebugIterations != -1)
-    DebugIterations = DebugIterations-1;
-  
   // If this block has a single predecessor, and if that pred has a single
   // successor, merge the blocks.  This encourages recursive jump threading
   // because now the condition in this block can be threaded through





More information about the llvm-commits mailing list