diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-12-12 22:16:13 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-12-12 22:16:13 +0000 |
| commit | a538439bf037039b3ae6e861b763cce7879bbbb6 (patch) | |
| tree | 7f0ae305863bcdbe60121dea64b6c9573216201b /llvm/lib | |
| parent | bf5b7cf638d53fc35aab0706f478af5d98cae5cd (diff) | |
| download | bcm5719-llvm-a538439bf037039b3ae6e861b763cce7879bbbb6.tar.gz bcm5719-llvm-a538439bf037039b3ae6e861b763cce7879bbbb6.zip | |
Reduce number of set operations.
llvm-svn: 18839
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index 22b4c347dcb..c7d349932c9 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/lib/Transforms/Scalar/ADCE.cpp @@ -91,9 +91,8 @@ private: TerminatorInst *convertToUnconditionalBranch(TerminatorInst *TI); inline void markInstructionLive(Instruction *I) { - if (LiveSet.count(I)) return; + if (!LiveSet.insert(I).second) return; DEBUG(std::cerr << "Insn Live: " << *I); - LiveSet.insert(I); WorkList.push_back(I); } |

