Avoid copying and recopying a std::set.

llvm-svn: 109405
This commit is contained in:
Dan Gohman 2010-07-26 17:45:33 +00:00
parent 2307c4bb76
commit 30005444fe
1 changed files with 2 additions and 6 deletions

View File

@ -140,12 +140,8 @@ void DominanceFrontier::splitBlock(BasicBlock *NewBB) {
// NewBBSucc inherits 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 (NewBBI != end())
addBasicBlock(NewBBSucc, NewBBI->second);
// If NewBB dominates NewBBSucc, then DF(NewBB) is now going to be the
// DF(NewBBSucc) without the stuff that the new block does not dominate