[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Dec 10 10:59:01 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
LICM.cpp updated: 1.46 -> 1.47
---
Log message:
Simplify code
---
Diffs of the changes: (+1 -6)
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.46 llvm/lib/Transforms/Scalar/LICM.cpp:1.47
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.46 Wed Dec 10 10:57:24 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp Wed Dec 10 10:58:24 2003
@@ -437,10 +437,8 @@
BasicBlock *ExitBlock = ExitBlocks[i];
if (isExitBlockDominatedByBlockInLoop(ExitBlock, InstOrigBB)) {
- std::set<BasicBlock*>::iterator SI =
- InsertedBlocks.lower_bound(ExitBlock);
// If we haven't already processed this exit block, do so now.
- if (SI == InsertedBlocks.end() || *SI != ExitBlock) {
+ if (InsertedBlocks.insert(ExitBlock).second) {
// Insert the code after the last PHI node...
BasicBlock::iterator InsertPt = ExitBlock->begin();
while (isa<PHINode>(InsertPt)) ++InsertPt;
@@ -461,9 +459,6 @@
// Now that we have inserted the instruction, store it into the alloca
new StoreInst(New, AI, InsertPt);
-
- // Remember we processed this block
- InsertedBlocks.insert(SI, ExitBlock);
}
}
}
More information about the llvm-commits
mailing list