diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2016-10-12 08:40:51 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2016-10-12 08:40:51 +0000 |
commit | fd6f6de3bed45fde218e405f077a2060254e0ec5 (patch) | |
tree | f43d7bd05bbc773e6be888fe4bb186c7c9de6bda | |
parent | be07d1184b96e7306c957417f1209cacaac4f1cf (diff) | |
download | bcm5719-llvm-fd6f6de3bed45fde218e405f077a2060254e0ec5.tar.gz bcm5719-llvm-fd6f6de3bed45fde218e405f077a2060254e0ec5.zip |
[LCG] Cleanup various places where comments said `SCC` but meant
`RefSCC`.
Also improve the comments surrounding the lazy post-order iterator as
they had grown stale since the RefSCC/SCC split.
I'm sure there are more comments that need updating here, but I saw and
fixed these and didn't want to lose them. I've not gotten to doing
a really complete audit of every comment yet.
llvm-svn: 283987
-rw-r--r-- | llvm/include/llvm/Analysis/LazyCallGraph.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h index ec7094d4c65..b53d2d123c0 100644 --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ b/llvm/include/llvm/Analysis/LazyCallGraph.h @@ -543,7 +543,7 @@ public: return make_range(parent_begin(), parent_end()); } - /// Test if this SCC is a parent of \a C. + /// Test if this RefSCC is a parent of \a C. bool isParentOf(const RefSCC &C) const { return C.isChildOf(*this); } /// Test if this RefSCC is an ancestor of \a C. @@ -557,9 +557,9 @@ public: /// Test if this RefSCC is a descendant of \a C. bool isDescendantOf(const RefSCC &C) const; - /// Provide a short name by printing this SCC to a std::string. + /// Provide a short name by printing this RefSCC to a std::string. /// - /// This copes with the fact that we don't have a name per-se for an SCC + /// This copes with the fact that we don't have a name per-se for an RefSCC /// while still making the use of this in debugging and logging useful. std::string getName() const { std::string Name; @@ -573,7 +573,7 @@ public: /// \name Mutation API /// /// These methods provide the core API for updating the call graph in the - /// presence of a (potentially still in-flight) DFS-found SCCs. + /// presence of (potentially still in-flight) DFS-found RefSCCs and SCCs. /// /// Note that these methods sometimes have complex runtimes, so be careful /// how you call them. @@ -753,12 +753,16 @@ public: ///@} }; - /// A post-order depth-first SCC iterator over the call graph. + /// A post-order depth-first RefSCC iterator over the call graph. + /// + /// This iterator triggers the Tarjan DFS-based formation of the RefSCC (and + /// SCC) DAG for the call graph, walking it lazily in depth-first post-order. + /// That is, it always visits RefSCCs for the target of a reference edge + /// prior to visiting the RefSCC for a source of the edge (when they are in + /// different RefSCCs). /// - /// This iterator triggers the Tarjan DFS-based formation of the SCC DAG for - /// the call graph, walking it lazily in depth-first post-order. That is, it - /// always visits SCCs for a callee prior to visiting the SCC for a caller - /// (when they are in different SCCs). + /// When forming each RefSCC, the call edges within it are used to form SCCs + /// within it, so iterating this also controls the lazy formation of SCCs. class postorder_ref_scc_iterator : public iterator_facade_base<postorder_ref_scc_iterator, std::forward_iterator_tag, RefSCC> { @@ -840,7 +844,7 @@ public: /// Lookup a function's SCC in the graph. /// - /// \returns null if the function hasn't been assigned an SCC via the SCC + /// \returns null if the function hasn't been assigned an SCC via the RefSCC /// iterator walk. SCC *lookupSCC(Node &N) const { return SCCMap.lookup(&N); } @@ -991,7 +995,7 @@ private: /// Set of entry nodes not-yet-processed into RefSCCs. SmallVector<Function *, 4> RefSCCEntryNodes; - /// Stack of nodes the DFS has walked but not yet put into a SCC. + /// Stack of nodes the DFS has walked but not yet put into a RefSCC. SmallVector<Node *, 4> PendingRefSCCStack; /// Counter for the next DFS number to assign. |