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

Chris Lattner sabre at nondot.org
Wed Nov 26 23:20:04 PST 2008


Author: lattner
Date: Thu Nov 27 01:20:04 2008
New Revision: 60157

URL: http://llvm.org/viewvc/llvm-project?rev=60157&view=rev
Log:
rename ThreadBlock to ProcessBlock, since it does other things than
just simple threading.

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=60157&r1=60156&r2=60157&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Thu Nov 27 01:20:04 2008
@@ -56,7 +56,7 @@
     JumpThreading() : FunctionPass(&ID) {}
 
     bool runOnFunction(Function &F);
-    bool ThreadBlock(BasicBlock *BB);
+    bool ProcessBlock(BasicBlock *BB);
     void ThreadEdge(BasicBlock *BB, BasicBlock *PredBB, BasicBlock *SuccBB);
     BasicBlock *FactorCommonPHIPreds(PHINode *PN, Constant *CstVal);
 
@@ -85,7 +85,7 @@
     AnotherIteration = false;
     bool Changed = false;
     for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
-      while (ThreadBlock(I))
+      while (ProcessBlock(I))
         Changed = true;
     AnotherIteration = Changed;
     EverChanged |= Changed;
@@ -187,9 +187,9 @@
 }
 
 
-/// ThreadBlock - If there are any predecessors whose control can be threaded
+/// ProcessBlock - If there are any predecessors whose control can be threaded
 /// through to a successor, transform them now.
-bool JumpThreading::ThreadBlock(BasicBlock *BB) {
+bool JumpThreading::ProcessBlock(BasicBlock *BB) {
   // 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