mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -336,21 +336,19 @@ BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P) {
|
||||
if (Loop *L = LI->getLoopFor(Old))
|
||||
L->addBasicBlockToLoop(New, LI->getBase());
|
||||
|
||||
if (DominatorTree *DT = P->getAnalysisIfAvailable<DominatorTree>())
|
||||
{
|
||||
// Old dominates New. New node domiantes all other nodes dominated by Old.
|
||||
DomTreeNode *OldNode = DT->getNode(Old);
|
||||
std::vector<DomTreeNode *> Children;
|
||||
for (DomTreeNode::iterator I = OldNode->begin(), E = OldNode->end();
|
||||
I != E; ++I)
|
||||
Children.push_back(*I);
|
||||
|
||||
DomTreeNode *NewNode = DT->addNewBlock(New,Old);
|
||||
if (DominatorTree *DT = P->getAnalysisIfAvailable<DominatorTree>()) {
|
||||
// Old dominates New. New node domiantes all other nodes dominated by Old.
|
||||
DomTreeNode *OldNode = DT->getNode(Old);
|
||||
std::vector<DomTreeNode *> Children;
|
||||
for (DomTreeNode::iterator I = OldNode->begin(), E = OldNode->end();
|
||||
I != E; ++I)
|
||||
Children.push_back(*I);
|
||||
|
||||
DomTreeNode *NewNode = DT->addNewBlock(New,Old);
|
||||
for (std::vector<DomTreeNode *>::iterator I = Children.begin(),
|
||||
E = Children.end(); I != E; ++I)
|
||||
DT->changeImmediateDominator(*I, NewNode);
|
||||
}
|
||||
}
|
||||
|
||||
if (DominanceFrontier *DF = P->getAnalysisIfAvailable<DominanceFrontier>())
|
||||
DF->splitBlock(Old);
|
||||
|
Reference in New Issue
Block a user