diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-12-12 22:22:18 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-12-12 22:22:18 +0000 |
| commit | d4298781c12979df061bcdd689d5222ef4c965e4 (patch) | |
| tree | 9158455572310ab6ffc67b200a6e2b909b486d7d /llvm/lib/Transforms/Scalar/ADCE.cpp | |
| parent | a538439bf037039b3ae6e861b763cce7879bbbb6 (diff) | |
| download | bcm5719-llvm-d4298781c12979df061bcdd689d5222ef4c965e4.tar.gz bcm5719-llvm-d4298781c12979df061bcdd689d5222ef4c965e4.zip | |
Remove some more set operations
llvm-svn: 18840
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ADCE.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index c7d349932c9..fde1308aba2 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/lib/Transforms/Scalar/ADCE.cpp @@ -283,10 +283,8 @@ bool ADCE::doADCE() { BasicBlock *BB = I->getParent(); if (!ReachableBBs.count(BB)) continue; - if (!AliveBlocks.count(BB)) { // Basic block not alive yet... - AliveBlocks.insert(BB); // Block is now ALIVE! + if (AliveBlocks.insert(BB).second) // Basic block not alive yet. markBlockAlive(BB); // Make it so now! - } // PHI nodes are a special case, because the incoming values are actually // defined in the predecessor nodes of this block, meaning that the PHI @@ -294,10 +292,8 @@ bool ADCE::doADCE() { // if (PHINode *PN = dyn_cast<PHINode>(I)) for (pred_iterator PI = pred_begin(BB), PE = pred_end(BB); PI != PE; ++PI) - if (!AliveBlocks.count(*PI)) { - AliveBlocks.insert(BB); // Block is now ALIVE! + if (AliveBlocks.insert(*PI).second) // Block is now ALIVE! markBlockAlive(*PI); - } // Loop over all of the operands of the live instruction, making sure that // they are known to be alive as well... |

