[llvm] 2296182 - Skip analysis re-computation when no changes are reported
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 12:41:14 PDT 2020
Author: serge-sans-paille
Date: 2020-08-28T21:41:01+02:00
New Revision: 2296182181521c0b1803a0cd10b098fcfdab1c92
URL: https://github.com/llvm/llvm-project/commit/2296182181521c0b1803a0cd10b098fcfdab1c92
DIFF: https://github.com/llvm/llvm-project/commit/2296182181521c0b1803a0cd10b098fcfdab1c92.diff
LOG: 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
Added:
Modified:
llvm/lib/Analysis/CallGraphSCCPass.cpp
llvm/lib/Analysis/LoopPass.cpp
llvm/lib/Analysis/RegionPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 17dd4dd389d5..2de18fe3863d 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -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);
}
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp
index 317b9577d791..50ed1cffa78a 100644
--- a/llvm/lib/Analysis/LoopPass.cpp
+++ b/llvm/lib/Analysis/LoopPass.cpp
@@ -254,7 +254,8 @@ bool LPPassManager::runOnFunction(Function &F) {
F.getContext().yield();
}
- removeNotPreservedAnalysis(P);
+ if (LocalChanged)
+ removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P,
CurrentLoopDeleted ? "<deleted>"
diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp
index 1e1971f119a0..ace682465abb 100644
--- a/llvm/lib/Analysis/RegionPass.cpp
+++ b/llvm/lib/Analysis/RegionPass.cpp
@@ -135,7 +135,8 @@ bool RGPassManager::runOnFunction(Function &F) {
verifyPreservedAnalysis(P);
}
- removeNotPreservedAnalysis(P);
+ if (LocalChanged)
+ removeNotPreservedAnalysis(P);
recordAvailableAnalysis(P);
removeDeadPasses(P,
(!isPassDebuggingExecutionsOrMore() || skipThisRegion) ?
More information about the llvm-commits
mailing list