From f9a77b77c2324b2ca5c644909ebda387daf82fe3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 3 May 2009 05:46:20 +0000 Subject: 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 --- lib/Transforms/Scalar/LoopDeletion.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Transforms/Scalar/LoopDeletion.cpp') 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(); -- cgit v1.2.3