[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Nick Lewycky
nicholas at mxc.ca
Wed Sep 13 11:55:51 PDT 2006
Changes in directory llvm/lib/Transforms/Scalar:
PredicateSimplifier.cpp updated: 1.7 -> 1.8
---
Log message:
Erase dead instructions.
---
Diffs of the changes: (+3 -2)
PredicateSimplifier.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.7 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.8
--- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.7 Mon Sep 11 12:23:34 2006
+++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Sep 13 13:55:37 2006
@@ -593,8 +593,8 @@
void PredicateSimplifier::visitBasicBlock(DTNodeType *DTNode,
PropertySet &KnownProperties) {
BasicBlock *BB = DTNode->getBlock();
- for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
- visitInstruction(I, DTNode, KnownProperties);
+ for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) {
+ visitInstruction(I++, DTNode, KnownProperties);
}
}
@@ -612,6 +612,7 @@
modified = true;
++NumInstruction;
I->replaceAllUsesWith(V);
+ I->eraseFromParent();
return;
}
More information about the llvm-commits
mailing list