]> granicus.if.org Git - llvm/commitdiff
[PM] Remove a pointless optimization.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 27 Dec 2016 18:04:11 +0000 (18:04 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 27 Dec 2016 18:04:11 +0000 (18:04 +0000)
There is no need to do this within an analysis. That method shouldn't
even be reached if this predicate holds as the actual useful
optimization is in the analysis manager itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290614 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/AliasAnalysis.cpp
lib/Analysis/BasicAliasAnalysis.cpp

index f88e40adb90dc148d1c996255bc7704d0d34219b..84da76be98bbc5fe497a6e3e225d6043a71c3fd3 100644 (file)
@@ -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<AAManager>();
   if (!PAC.preserved() && !PAC.preservedSet<AllAnalysesOn<Function>>())
index 406f2744e56d4f5942152a2edb69499412631df9..e8d86bdbca5ba0fc6785afa811dab29f82fcf41f 100644 (file)
@@ -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