From 57ab1e6b3b429ac5c48e07a64f0d5dfba0188e3a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 27 Dec 2016 18:04:11 +0000 Subject: [PATCH] [PM] Remove a pointless optimization. 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. llvm-svn: 290614 --- lib/Analysis/AliasAnalysis.cpp | 3 --- lib/Analysis/BasicAliasAnalysis.cpp | 3 --- 2 files changed, 6 deletions(-) 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