summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopPassManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/LoopPassManager.cpp')
-rw-r--r--llvm/lib/Analysis/LoopPassManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/LoopPassManager.cpp b/llvm/lib/Analysis/LoopPassManager.cpp
index deb68e75ded..044e5d55daf 100644
--- a/llvm/lib/Analysis/LoopPassManager.cpp
+++ b/llvm/lib/Analysis/LoopPassManager.cpp
@@ -33,7 +33,8 @@ bool LoopAnalysisManagerFunctionProxy::Result::invalidate(
// the module may have changed. We therefore can't call
// InnerAM->invalidate(), because any pointers to Functions it has may be
// stale.
- if (!PA.preserved(LoopAnalysisManagerFunctionProxy::ID()))
+ auto PAC = PA.getChecker<LoopAnalysisManagerFunctionProxy>();
+ if (!PAC.preserved() && !PAC.preservedSet<AllAnalysesOn<Loop>>())
InnerAM->clear();
// FIXME: Proper suppor for invalidation isn't yet implemented for the LPM.
OpenPOWER on IntegriCloud