Fix bug in updating dominance frontier after loop

unswitch when frontier includes basic blocks that 
are not inside loop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2007-10-05 22:29:34 +00:00
parent b75ed322c4
commit 5c4cd0d82e
3 changed files with 151 additions and 29 deletions
+5 -2
View File
@@ -422,8 +422,11 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
}
if (NewBBI != end()) {
DominanceFrontier::DomSetType NewBBSet = NewBBI->second;
NewBBSet.insert(Set.begin(), Set.end());
for (DominanceFrontier::DomSetType::iterator SetI = Set.begin(),
E = Set.end(); SetI != E; ++SetI) {
BasicBlock *SB = *SetI;
addToFrontier(NewBBI, SB);
}
} else
addBasicBlock(NewBB, Set);
}