[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Dec 18 02:13:08 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
LICM.cpp updated: 1.51 -> 1.52
---
Log message:
When we delete instructions from the loop, make sure to remove them from the
AliasSetTracker as well.
---
Diffs of the changes: (+2 -0)
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.51 llvm/lib/Transforms/Scalar/LICM.cpp:1.52
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.51 Sat Dec 13 22:52:31 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp Thu Dec 18 02:12:32 2003
@@ -387,6 +387,7 @@
if (ExitBlocks.size() == 1) {
if (!isExitBlockDominatedByBlockInLoop(ExitBlocks[0], I.getParent())) {
// Instruction is not used, just delete it.
+ CurAST->remove(&I);
I.getParent()->getInstList().erase(&I);
} else {
// Move the instruction to the start of the exit block, after any PHI
@@ -399,6 +400,7 @@
}
} else if (ExitBlocks.size() == 0) {
// The instruction is actually dead if there ARE NO exit blocks.
+ CurAST->remove(&I);
I.getParent()->getInstList().erase(&I);
} else {
// Otherwise, if we have multiple exits, use the PromoteMem2Reg function to
More information about the llvm-commits
mailing list