Rename SuccessorNumber to GetSuccessorNumber.
authorBob Wilson <bob.wilson@apple.com>
Tue, 16 Feb 2010 21:06:42 +0000 (21:06 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 16 Feb 2010 21:06:42 +0000 (21:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96387 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/BasicBlockUtils.h
lib/Transforms/Scalar/GVN.cpp
lib/Transforms/Utils/BasicBlockUtils.cpp

index 281437150f2a9a8629284e07367212f2ecede853..5279e9620f0a374e335bb12fdadd2976eb9f3afd 100644 (file)
@@ -102,10 +102,11 @@ void FindFunctionBackedges(const Function &F,
 //
 void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum);
 
-/// SuccessorNumber - Search for the specified successor of basic block BB and
-/// return its position in the terminator instruction's list of successors.
-/// It is an error to call this with a block that is not a successor.
-unsigned SuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
+/// GetSuccessorNumber - Search for the specified successor of basic block BB
+/// and return its position in the terminator instruction's list of
+/// successors.  It is an error to call this with a block that is not a
+/// successor.
+unsigned GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
 
 /// isCriticalEdge - Return true if the specified edge is a critical edge.
 /// Critical edges are edges from a block with multiple successors to a block
index c144e16f48eae0c12428dfc753729e61a1de372a..0f01bc1266896a308c6846c02ac07dea626ea3df 100644 (file)
@@ -1594,7 +1594,7 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
               << Pred->getName() << "': " << *LI << '\n');
         return false;
       }
-      unsigned SuccNum = SuccessorNumber(Pred, LoadBB);
+      unsigned SuccNum = GetSuccessorNumber(Pred, LoadBB);
       toSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum));
       return false;
     }
@@ -2151,7 +2151,7 @@ bool GVN::performPRE(Function &F) {
       // We can't do PRE safely on a critical edge, so instead we schedule
       // the edge to be split and perform the PRE the next time we iterate
       // on the function.
-      unsigned SuccNum = SuccessorNumber(PREPred, CurrentBlock);
+      unsigned SuccNum = GetSuccessorNumber(PREPred, CurrentBlock);
       if (isCriticalEdge(PREPred->getTerminator(), SuccNum)) {
         toSplit.push_back(std::make_pair(PREPred->getTerminator(), SuccNum));
         continue;
index 60185d2687a5b5b6530627ab2c8dce43d112720c..1f62dabb2014b297ad1887f98a29d81e378c7d0c 100644 (file)
@@ -274,10 +274,11 @@ void llvm::RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
     ReplaceInstWithInst(TI, NewTI);
 }
 
-/// SuccessorNumber - Search for the specified successor of basic block BB and
-/// return its position in the terminator instruction's list of successors.
-/// It is an error to call this with a block that is not a successor.
-unsigned llvm::SuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
+/// GetSuccessorNumber - Search for the specified successor of basic block BB
+/// and return its position in the terminator instruction's list of
+/// successors.  It is an error to call this with a block that is not a
+/// successor.
+unsigned llvm::GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
   TerminatorInst *Term = BB->getTerminator();
 #ifndef NDEBUG
   unsigned e = Term->getNumSuccessors();
@@ -293,7 +294,7 @@ unsigned llvm::SuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
 /// SplitEdge -  Split the edge connecting specified block. Pass P must 
 /// not be NULL. 
 BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, Pass *P) {
-  unsigned SuccNum = SuccessorNumber(BB, Succ);
+  unsigned SuccNum = GetSuccessorNumber(BB, Succ);
   
   // If this is a critical edge, let SplitCriticalEdge do it.
   TerminatorInst *LatchTerm = BB->getTerminator();