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