[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Dec 10 10:58:02 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
LICM.cpp updated: 1.45 -> 1.46
---
Log message:
Avoid performing two identical lookups when one will suffice
---
Diffs of the changes: (+1 -3)
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.45 llvm/lib/Transforms/Scalar/LICM.cpp:1.46
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.45 Wed Dec 10 09:56:24 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp Wed Dec 10 10:57:24 2003
@@ -603,9 +603,7 @@
const std::vector<BasicBlock*> &ExitBlocks = CurLoop->getExitBlocks();
for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i)
- if (!ProcessedBlocks.count(ExitBlocks[i])) {
- ProcessedBlocks.insert(ExitBlocks[i]);
-
+ if (ProcessedBlocks.insert(ExitBlocks[i]).second) {
// Copy all of the allocas into their memory locations...
BasicBlock::iterator BI = ExitBlocks[i]->begin();
while (isa<PHINode>(*BI))
More information about the llvm-commits
mailing list