[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2016-12-27 18:04:11 +00:00
parent 124216b0de
commit 459a6e825b
2 changed files with 0 additions and 6 deletions

View 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>>())

View 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