summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CGSCCPassManager.cpp
diff options
context:
space:
mode:
authorFedor Sergeev <fedor.sergeev@azul.com>2018-12-11 19:05:35 +0000
committerFedor Sergeev <fedor.sergeev@azul.com>2018-12-11 19:05:35 +0000
commita1d95c3fc426f1fc54758866d8a0e8718a82a745 (patch)
treeb74bc92ef0ca2ebbd6bee333fde390a3c362635c /llvm/lib/Analysis/CGSCCPassManager.cpp
parent8876dac50aafa5a265c1fb1a9d4e38f97b83dfb6 (diff)
downloadbcm5719-llvm-a1d95c3fc426f1fc54758866d8a0e8718a82a745.tar.gz
bcm5719-llvm-a1d95c3fc426f1fc54758866d8a0e8718a82a745.zip
[NewPM] fixing asserts on deleted loop in -print-after-all
IR-printing AfterPass instrumentation might be called on a loop that has just been invalidated. We should skip printing it to avoid spurious asserts. Reviewed By: chandlerc, philip.pfaffe Differential Revision: https://reviews.llvm.org/D54740 llvm-svn: 348887
Diffstat (limited to 'llvm/lib/Analysis/CGSCCPassManager.cpp')
-rw-r--r--llvm/lib/Analysis/CGSCCPassManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CGSCCPassManager.cpp b/llvm/lib/Analysis/CGSCCPassManager.cpp
index 6965235326d..fd2292ced01 100644
--- a/llvm/lib/Analysis/CGSCCPassManager.cpp
+++ b/llvm/lib/Analysis/CGSCCPassManager.cpp
@@ -79,7 +79,10 @@ PassManager<LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &,
PreservedAnalyses PassPA = Pass->run(*C, AM, G, UR);
- PI.runAfterPass(*Pass, *C);
+ if (UR.InvalidatedSCCs.count(C))
+ PI.runAfterPassInvalidated<LazyCallGraph::SCC>(*Pass);
+ else
+ PI.runAfterPass<LazyCallGraph::SCC>(*Pass, *C);
// Update the SCC if necessary.
C = UR.UpdatedC ? UR.UpdatedC : C;
OpenPOWER on IntegriCloud