From: Chris Lattner Date: Sun, 12 Dec 2004 22:16:13 +0000 (+0000) Subject: Reduce number of set operations. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=188839a2193005e6ee48b1189402d71edcd2a456;p=oota-llvm.git Reduce number of set operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index 22b4c347dcb..c7d349932c9 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); }