[llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 12 14:16:27 PST 2004
Changes in directory llvm/lib/Transforms/Scalar:
ADCE.cpp updated: 1.83 -> 1.84
---
Log message:
Reduce number of set operations.
---
Diffs of the changes: (+1 -2)
Index: llvm/lib/Transforms/Scalar/ADCE.cpp
diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.83 llvm/lib/Transforms/Scalar/ADCE.cpp:1.84
--- llvm/lib/Transforms/Scalar/ADCE.cpp:1.83 Sun Oct 17 18:45:06 2004
+++ llvm/lib/Transforms/Scalar/ADCE.cpp Sun Dec 12 16:16:13 2004
@@ -91,9 +91,8 @@
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);
}
More information about the llvm-commits
mailing list