From a538439bf037039b3ae6e861b763cce7879bbbb6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 12 Dec 2004 22:16:13 +0000 Subject: Reduce number of set operations. llvm-svn: 18839 --- llvm/lib/Transforms/Scalar/ADCE.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/ADCE.cpp') 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); } -- cgit v1.2.3