summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-08-01 06:40:11 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-08-01 06:40:11 +0000
commit3c6a820ce3393150e4a60a816c8f7c59f3efb61d (patch)
tree09118a73f6f133aa6eab5ebdeeb73a3b959a43b0
parent85da7543f9776a0eba58a2043f0b84d81c7a5ef8 (diff)
downloadbcm5719-llvm-3c6a820ce3393150e4a60a816c8f7c59f3efb61d.tar.gz
bcm5719-llvm-3c6a820ce3393150e4a60a816c8f7c59f3efb61d.zip
[PM] Add a comment clarifying what a particular predicate is doing.
This came up as a point of confusion while working on a fundamental problem with the combination of CGSCC iteration and the inliner. llvm-svn: 309662
-rw-r--r--llvm/lib/Analysis/CGSCCPassManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/CGSCCPassManager.cpp b/llvm/lib/Analysis/CGSCCPassManager.cpp
index 74b5d79ebac..cb6d139c88c 100644
--- a/llvm/lib/Analysis/CGSCCPassManager.cpp
+++ b/llvm/lib/Analysis/CGSCCPassManager.cpp
@@ -619,6 +619,14 @@ LazyCallGraph::SCC &llvm::updateCGAndAnalysisManagerForFunctionPass(
AM.invalidate(*C, PA);
}
auto NewSCCIndex = RC->find(*C) - RC->begin();
+ // If we have actually moved an SCC to be topologically "below" the current
+ // one due to merging, we will need to revisit the current SCC after
+ // visiting those moved SCCs.
+ //
+ // It is critical that we *do not* revisit the current SCC unless we
+ // actually move SCCs in the process of merging because otherwise we may
+ // form a cycle where an SCC is split apart, merged, split, merged and so
+ // on infinitely.
if (InitialSCCIndex < NewSCCIndex) {
// Put our current SCC back onto the worklist as we'll visit other SCCs
// that are now definitively ordered prior to the current one in the
OpenPOWER on IntegriCloud