diff options
| author | Dan Gohman <gohman@apple.com> | 2009-05-03 05:46:20 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-05-03 05:46:20 +0000 |
| commit | 5036695c32835ad0fb280b9d20f9214f5270dfb0 (patch) | |
| tree | 611a881c018a3620022de19c72bd293785cf274c /llvm/lib/Transforms/Scalar/LoopDeletion.cpp | |
| parent | 7d79a5f87dcd6ab25607315c894325088949b299 (diff) | |
| download | bcm5719-llvm-5036695c32835ad0fb280b9d20f9214f5270dfb0.tar.gz bcm5719-llvm-5036695c32835ad0fb280b9d20f9214f5270dfb0.zip | |
Revert r70645 for now; it's causing a variety of regressions.
llvm-svn: 70661
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopDeletion.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDeletion.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp b/llvm/lib/Transforms/Scalar/LoopDeletion.cpp index 96b7a5288a7..83c25619bfc 100644 --- a/llvm/lib/Transforms/Scalar/LoopDeletion.cpp +++ b/llvm/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(); |

