diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-02-16 21:06:42 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-02-16 21:06:42 +0000 |
commit | ae23daf63afccd68be965ff4f7acafa818d76aaa (patch) | |
tree | c1f91de79651bec86e58a778ebe73c34bf671ef9 /lib/Transforms | |
parent | 8939b0d8a930729cd8d9c06dd4afd08de93260d2 (diff) | |
download | external_llvm-ae23daf63afccd68be965ff4f7acafa818d76aaa.zip external_llvm-ae23daf63afccd68be965ff4f7acafa818d76aaa.tar.gz external_llvm-ae23daf63afccd68be965ff4f7acafa818d76aaa.tar.bz2 |
Rename SuccessorNumber to GetSuccessorNumber.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/BasicBlockUtils.cpp | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index c144e16..0f01bc1 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -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; diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp index 60185d2..1f62dab 100644 --- a/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -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(); |