[llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Nick Lewycky
nicholas at mxc.ca
Tue Jun 5 20:52:18 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
IndVarSimplify.cpp updated: 1.119 -> 1.120
---
Log message:
Inform ScalarEvolutions that we're deleting Values.
This is the obviously correct part of the fix for PR1487: http://llvm.org/PR1487 .
---
Diffs of the changes: (+2 -0)
IndVarSimplify.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.119 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.120
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.119 Sun May 6 08:37:16 2007
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Jun 5 22:51:56 2007
@@ -181,6 +181,7 @@
GetElementPtrInst *NGEPI = new GetElementPtrInst(
NCE, Constant::getNullValue(Type::Int32Ty), NewAdd,
GEPI->getName(), GEPI);
+ SE->deleteInstructionFromRecords(GEPI);
GEPI->replaceAllUsesWith(NGEPI);
GEPI->eraseFromParent();
GEPI = NGEPI;
@@ -398,6 +399,7 @@
// the PHI entirely. This is safe, because the NewVal won't be variant
// in the loop, so we don't need an LCSSA phi node anymore.
if (NumPreds == 1) {
+ SE->deleteInstructionFromRecords(PN);
PN->replaceAllUsesWith(ExitVal);
PN->eraseFromParent();
break;
More information about the llvm-commits
mailing list