diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Analysis/LoopPass.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 507f5f4428659..520f06003dd22 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -93,38 +93,6 @@ void LPPassManager::addLoop(Loop &L) { } } -/// cloneBasicBlockSimpleAnalysis - Invoke cloneBasicBlockAnalysis hook for -/// all loop passes. -void LPPassManager::cloneBasicBlockSimpleAnalysis(BasicBlock *From, - BasicBlock *To, Loop *L) { - for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { - LoopPass *LP = getContainedPass(Index); - LP->cloneBasicBlockAnalysis(From, To, L); - } -} - -/// deleteSimpleAnalysisValue - Invoke deleteAnalysisValue hook for all passes. -void LPPassManager::deleteSimpleAnalysisValue(Value *V, Loop *L) { - if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) { - for (Instruction &I : *BB) { - deleteSimpleAnalysisValue(&I, L); - } - } - for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { - LoopPass *LP = getContainedPass(Index); - LP->deleteAnalysisValue(V, L); - } -} - -/// Invoke deleteAnalysisLoop hook for all passes. -void LPPassManager::deleteSimpleAnalysisLoop(Loop *L) { - for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { - LoopPass *LP = getContainedPass(Index); - LP->deleteAnalysisLoop(L); - } -} - - // Recurse through all subloops and all loops into LQ. static void addLoopIntoQueue(Loop *L, std::deque<Loop *> &LQ) { LQ.push_back(L); @@ -246,10 +214,7 @@ bool LPPassManager::runOnFunction(Function &F) { : CurrentLoop->getName()); dumpPreservedSet(P); - if (CurrentLoopDeleted) { - // Notify passes that the loop is being deleted. - deleteSimpleAnalysisLoop(CurrentLoop); - } else { + if (!CurrentLoopDeleted) { // Manually check that this loop is still healthy. This is done // instead of relying on LoopInfo::verifyLoop since LoopInfo // is a function pass and it's really expensive to verify every |