diff options
| author | Dan Gohman <gohman@apple.com> | 2010-07-26 17:45:33 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-07-26 17:45:33 +0000 |
| commit | 30005444fe7b6956db675db343e47613b19f8219 (patch) | |
| tree | cf98bcd8b34c4fee8aa7ec827c84aa528293156e /llvm/lib/VMCore/Dominators.cpp | |
| parent | 2307c4bb763b54dda2be6fd0cbb95971adeee01c (diff) | |
| download | bcm5719-llvm-30005444fe7b6956db675db343e47613b19f8219.tar.gz bcm5719-llvm-30005444fe7b6956db675db343e47613b19f8219.zip | |
Avoid copying and recopying a std::set.
llvm-svn: 109405
Diffstat (limited to 'llvm/lib/VMCore/Dominators.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Dominators.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp index 8a33eb06236..8a68b4e9da1 100644 --- a/llvm/lib/VMCore/Dominators.cpp +++ b/llvm/lib/VMCore/Dominators.cpp @@ -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 |

