Skip analysis re-computation when no changes are reported

This is a follow-up to https://reviews.llvm.org/D80707, generalized to
CallGraphSCC, Loop and Region

Differential Revision: https://reviews.llvm.org/D86442
This commit is contained in:
serge-sans-paille 2020-08-28 10:24:48 +02:00
parent acefed239a
commit 41f672146f
3 changed files with 6 additions and 3 deletions

View File

@ -489,7 +489,8 @@ bool CGPassManager::RunAllPassesOnSCC(CallGraphSCC &CurSCC, CallGraph &CG,
dumpPreservedSet(P);
verifyPreservedAnalysis(P);
removeNotPreservedAnalysis(P);
if (LocalChanged)
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P, "", ON_CG_MSG);
}

View File

@ -254,7 +254,8 @@ bool LPPassManager::runOnFunction(Function &F) {
F.getContext().yield();
}
removeNotPreservedAnalysis(P);
if (LocalChanged)
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P,
CurrentLoopDeleted ? "<deleted>"

View File

@ -135,7 +135,8 @@ bool RGPassManager::runOnFunction(Function &F) {
verifyPreservedAnalysis(P);
}
removeNotPreservedAnalysis(P);
if (LocalChanged)
removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P,
(!isPassDebuggingExecutionsOrMore() || skipThisRegion) ?