mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA. Fix dominance frontier update during loop unswitch. This fixes PR 1589. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -627,6 +627,15 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
|
||||
if (!DT.dominates(NewBB, NewBBSucc))
|
||||
NewBBDominatesNewBBSucc = false;
|
||||
|
||||
// NewBBSucc inherites original NewBB frontier.
|
||||
DominanceFrontier::iterator NewBBI = find(NewBB);
|
||||
if (NewBBI != end()) {
|
||||
DominanceFrontier::DomSetType NewBBSet = NewBBI->second;
|
||||
DominanceFrontier::DomSetType NewBBSuccSet;
|
||||
NewBBSuccSet.insert(NewBBSet.begin(), NewBBSet.end());
|
||||
addBasicBlock(NewBBSucc, NewBBSuccSet);
|
||||
}
|
||||
|
||||
// If NewBB dominates NewBBSucc, then DF(NewBB) is now going to be the
|
||||
// DF(PredBlocks[0]) without the stuff that the new block does not dominate
|
||||
// a predecessor of.
|
||||
@@ -648,7 +657,6 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
|
||||
++SetI;
|
||||
}
|
||||
|
||||
DominanceFrontier::iterator NewBBI = find(NewBB);
|
||||
if (NewBBI != end()) {
|
||||
DominanceFrontier::DomSetType NewBBSet = NewBBI->second;
|
||||
NewBBSet.insert(Set.begin(), Set.end());
|
||||
|
Reference in New Issue
Block a user