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 | 188839a2193005e6ee48b1189402d71edcd2a456 (patch) | |
tree | 139d397b60d0f2201cc87c8179cb12d28a0a15da /lib/Transforms | |
parent | 857e8cdd65e1942eaa205a7a3af491b470f2d648 (diff) |
Reduce number of set operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 22b4c347dc..c7d349932c 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/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); } |