[LCG] Hoist the logic for forming a new SCC from the top of the DFSStack

into a helper function. I plan to re-use it for doing incremental
DFS-based updates to the SCCs when we mutate the call graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth
2014-04-23 06:09:03 +00:00
parent b3112f6acc
commit b001573515
2 changed files with 52 additions and 41 deletions

View File

@ -364,6 +364,11 @@ private:
/// \brief Helper to update pointers back to the graph object during moves.
void updateGraphPtrs();
/// \brief Helper to form a new SCC out of the top of a DFSStack-like
/// structure.
SCC *formSCCFromDFSStack(
SmallVectorImpl<std::pair<Node *, Node::iterator>> &DFSStack);
/// \brief Retrieve the next node in the post-order SCC walk of the call graph.
SCC *getNextSCCInPostOrder();
};