summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/LoopDeletion.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-05-03 05:46:20 +0000
committerDan Gohman <gohman@apple.com>2009-05-03 05:46:20 +0000
commitf9a77b77c2324b2ca5c644909ebda387daf82fe3 (patch)
tree480474eeed43ad0aace0877991230a0ac7d26a1e /lib/Transforms/Scalar/LoopDeletion.cpp
parent0e670dfa277279463d7c8d8bba093c2b2160d9ff (diff)
downloadllvm-f9a77b77c2324b2ca5c644909ebda387daf82fe3.tar.gz
llvm-f9a77b77c2324b2ca5c644909ebda387daf82fe3.tar.bz2
llvm-f9a77b77c2324b2ca5c644909ebda387daf82fe3.tar.xz
Revert r70645 for now; it's causing a variety of regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70661 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopDeletion.cpp')
-rw-r--r--lib/Transforms/Scalar/LoopDeletion.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopDeletion.cpp b/lib/Transforms/Scalar/LoopDeletion.cpp
index 96b7a5288a..83c25619bf 100644
--- a/lib/Transforms/Scalar/LoopDeletion.cpp
+++ b/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -246,6 +246,13 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
DT.eraseNode(*LI);
if (DF) DF->removeBlock(*LI);
+ // Remove instructions that we're deleting from ScalarEvolution.
+ for (BasicBlock::iterator BI = (*LI)->begin(), BE = (*LI)->end();
+ BI != BE; ++BI)
+ SE.deleteValueFromRecords(BI);
+
+ SE.deleteValueFromRecords(*LI);
+
// Remove the block from the reference counting scheme, so that we can
// delete it freely later.
(*LI)->dropAllReferences();