diff options
author | Easwaran Raman <eraman@google.com> | 2018-02-01 19:40:35 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2018-02-01 19:40:35 +0000 |
commit | 06a715333ad77df68da1562b5b8368eb219fbfd9 (patch) | |
tree | cf7251e6361b29388feab94b26dfddb8271c0a6d /llvm/lib/Analysis/SyntheticCountsUtils.cpp | |
parent | 27b2990d11eccdc2cbb723db02ecd5bd4463bd9d (diff) | |
download | bcm5719-llvm-06a715333ad77df68da1562b5b8368eb219fbfd9.tar.gz bcm5719-llvm-06a715333ad77df68da1562b5b8368eb219fbfd9.zip |
Remove CallGraphTraits and use equivalent methods in GraphTraits
Summary:
D42698 adds child_edge_{begin|end} and children_edges to GraphTraits
which are used here. The reason for this change is to make it easy to
use count propagation on ModulesummaryIndex. As it stands,
CallGraphTraits is in Analysis while ModuleSummaryIndex is in IR.
Reviewers: davidxl, dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42703
llvm-svn: 323994
Diffstat (limited to 'llvm/lib/Analysis/SyntheticCountsUtils.cpp')
-rw-r--r-- | llvm/lib/Analysis/SyntheticCountsUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/SyntheticCountsUtils.cpp b/llvm/lib/Analysis/SyntheticCountsUtils.cpp index 22b402b21e6..b085fa274d7 100644 --- a/llvm/lib/Analysis/SyntheticCountsUtils.cpp +++ b/llvm/lib/Analysis/SyntheticCountsUtils.cpp @@ -38,7 +38,7 @@ void SyntheticCountsUtils<CallGraphType>::propagateFromSCC( // Partition the edges coming out of the SCC into those whose destination is // in the SCC and the rest. for (const auto &Node : SCCNodes) { - for (auto &E : call_edges<CallGraphType>(Node)) { + for (auto &E : children_edges<CallGraphType>(Node)) { if (SCCNodes.count(CGT::edge_dest(E))) SCCEdges.emplace_back(Node, E); else @@ -89,7 +89,7 @@ void SyntheticCountsUtils<CallGraphType>::propagateFromSCC( /// This performs a reverse post-order traversal of the callgraph SCC. For each /// SCC, it first propagates the entry counts to the nodes within the SCC /// through call edges and updates them in one shot. Then the entry counts are -/// propagated to nodes outside the SCC. This requires \p CallGraphTraits +/// propagated to nodes outside the SCC. This requires \p GraphTraits /// to have a specialization for \p CallGraphType. template <typename CallGraphType> |