diff options
author | Devang Patel <dpatel@apple.com> | 2009-03-25 23:57:48 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-03-25 23:57:48 +0000 |
commit | 575ec806e0d6e10eaf1bbe4163379d51565f7fe4 (patch) | |
tree | 6adfb2dd1e8a83e6c858a6e10f13483a3d6f9fab /lib/Analysis/LoopPass.cpp | |
parent | 54f302272c6bf98638d224949be8bd23a120ba48 (diff) |
Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LoopPass.cpp')
-rw-r--r-- | lib/Analysis/LoopPass.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index c4ff988944..08c25f4cea 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -152,6 +152,13 @@ void LPPassManager::cloneBasicBlockSimpleAnalysis(BasicBlock *From, /// deleteSimpleAnalysisValue - Invoke deleteAnalysisValue hook for all passes. void LPPassManager::deleteSimpleAnalysisValue(Value *V, Loop *L) { + if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) { + for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; + ++BI) { + Instruction &I = *BI; + deleteSimpleAnalysisValue(&I, L); + } + } for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { Pass *P = getContainedPass(Index); LoopPass *LP = dynamic_cast<LoopPass *>(P); |