mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
Rename SuccessorNumber to GetSuccessorNumber.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8939b0d8a9
commit
ae23daf63a
@ -102,10 +102,11 @@ void FindFunctionBackedges(const Function &F,
|
|||||||
//
|
//
|
||||||
void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum);
|
void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum);
|
||||||
|
|
||||||
/// SuccessorNumber - Search for the specified successor of basic block BB and
|
/// GetSuccessorNumber - Search for the specified successor of basic block BB
|
||||||
/// return its position in the terminator instruction's list of successors.
|
/// and return its position in the terminator instruction's list of
|
||||||
/// It is an error to call this with a block that is not a successor.
|
/// successors. It is an error to call this with a block that is not a
|
||||||
unsigned SuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
|
/// successor.
|
||||||
|
unsigned GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ);
|
||||||
|
|
||||||
/// isCriticalEdge - Return true if the specified edge is a critical edge.
|
/// isCriticalEdge - Return true if the specified edge is a critical edge.
|
||||||
/// Critical edges are edges from a block with multiple successors to a block
|
/// Critical edges are edges from a block with multiple successors to a block
|
||||||
|
@ -1594,7 +1594,7 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
|
|||||||
<< Pred->getName() << "': " << *LI << '\n');
|
<< Pred->getName() << "': " << *LI << '\n');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unsigned SuccNum = SuccessorNumber(Pred, LoadBB);
|
unsigned SuccNum = GetSuccessorNumber(Pred, LoadBB);
|
||||||
toSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum));
|
toSplit.push_back(std::make_pair(Pred->getTerminator(), SuccNum));
|
||||||
return false;
|
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
|
// 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
|
// the edge to be split and perform the PRE the next time we iterate
|
||||||
// on the function.
|
// on the function.
|
||||||
unsigned SuccNum = SuccessorNumber(PREPred, CurrentBlock);
|
unsigned SuccNum = GetSuccessorNumber(PREPred, CurrentBlock);
|
||||||
if (isCriticalEdge(PREPred->getTerminator(), SuccNum)) {
|
if (isCriticalEdge(PREPred->getTerminator(), SuccNum)) {
|
||||||
toSplit.push_back(std::make_pair(PREPred->getTerminator(), SuccNum));
|
toSplit.push_back(std::make_pair(PREPred->getTerminator(), SuccNum));
|
||||||
continue;
|
continue;
|
||||||
|
@ -274,10 +274,11 @@ void llvm::RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
|
|||||||
ReplaceInstWithInst(TI, NewTI);
|
ReplaceInstWithInst(TI, NewTI);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SuccessorNumber - Search for the specified successor of basic block BB and
|
/// GetSuccessorNumber - Search for the specified successor of basic block BB
|
||||||
/// return its position in the terminator instruction's list of successors.
|
/// and return its position in the terminator instruction's list of
|
||||||
/// It is an error to call this with a block that is not a successor.
|
/// successors. It is an error to call this with a block that is not a
|
||||||
unsigned llvm::SuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
|
/// successor.
|
||||||
|
unsigned llvm::GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ) {
|
||||||
TerminatorInst *Term = BB->getTerminator();
|
TerminatorInst *Term = BB->getTerminator();
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
unsigned e = Term->getNumSuccessors();
|
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
|
/// SplitEdge - Split the edge connecting specified block. Pass P must
|
||||||
/// not be NULL.
|
/// not be NULL.
|
||||||
BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, Pass *P) {
|
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.
|
// If this is a critical edge, let SplitCriticalEdge do it.
|
||||||
TerminatorInst *LatchTerm = BB->getTerminator();
|
TerminatorInst *LatchTerm = BB->getTerminator();
|
||||||
|
Loading…
Reference in New Issue
Block a user