diff --git a/lib/Analysis/AliasAnalysis.cpp b/lib/Analysis/AliasAnalysis.cpp index f88e40adb90..84da76be98b 100644 --- a/lib/Analysis/AliasAnalysis.cpp +++ b/lib/Analysis/AliasAnalysis.cpp @@ -72,9 +72,6 @@ AAResults::~AAResults() { bool AAResults::invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv) { - if (PA.areAllPreserved()) - return false; // Nothing to do, everything is still valid. - // Check if the AA manager itself has been invalidated. auto PAC = PA.getChecker(); if (!PAC.preserved() && !PAC.preservedSet>()) diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 406f2744e56..e8d86bdbca5 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -65,9 +65,6 @@ static const unsigned MaxLookupSearchDepth = 6; bool BasicAAResult::invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv) { - if (PA.areAllPreserved()) - return false; // Nothing to do, everything is still valid. - // We don't care if this analysis itself is preserved, it has no state. But // we need to check that the analyses it depends on have been. Note that we // may be created without handles to some analyses and in that case don't