aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Dominators.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-26 17:45:33 +0000
committerDan Gohman <gohman@apple.com>2010-07-26 17:45:33 +0000
commitd2d975233d3f56a0aec3ee3965c1cdb7a6ba1dbd (patch)
treee9f3eb4d847f12bb41b873eb0e7ecaf33f8d3d78 /lib/VMCore/Dominators.cpp
parente96a6fe351b0cf8da5dc7eaddd44618bbdd25fd3 (diff)
downloadexternal_llvm-d2d975233d3f56a0aec3ee3965c1cdb7a6ba1dbd.zip
external_llvm-d2d975233d3f56a0aec3ee3965c1cdb7a6ba1dbd.tar.gz
external_llvm-d2d975233d3f56a0aec3ee3965c1cdb7a6ba1dbd.tar.bz2
Avoid copying and recopying a std::set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Dominators.cpp')
-rw-r--r--lib/VMCore/Dominators.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp
index 8a33eb0..8a68b4e 100644
--- a/lib/VMCore/Dominators.cpp
+++ b/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