summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-12 22:16:13 +0000
committerChris Lattner <sabre@nondot.org>2004-12-12 22:16:13 +0000
commita538439bf037039b3ae6e861b763cce7879bbbb6 (patch)
tree7f0ae305863bcdbe60121dea64b6c9573216201b /llvm/lib/Transforms
parentbf5b7cf638d53fc35aab0706f478af5d98cae5cd (diff)
downloadbcm5719-llvm-a538439bf037039b3ae6e861b763cce7879bbbb6.tar.gz
bcm5719-llvm-a538439bf037039b3ae6e861b763cce7879bbbb6.zip
Reduce number of set operations.
llvm-svn: 18839
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp3
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);
}
OpenPOWER on IntegriCloud