[PATCH] D140908: [MemProf] Context disambiguation cloning pass [patch 1a/3]
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 12:06:44 PDT 2023
tejohnson marked 2 inline comments as done.
tejohnson added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp:1355
+template <typename DerivedCCG, typename FuncTy, typename CallTy>
+void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::print(
+ raw_ostream &OS) const {
----------------
snehasish wrote:
> Now that we have GraphTraits, can we use the graph iterators instead of our own DFS here?
For both this and check() below, we don't need or want DFS. The problem with DFS is that it seems to expect a single root entry node, which we don't have. But neither of these traversals need to be in any specific order. So I have simply replaced the recursive walk with using the nodes() range iterator provided by GraphTraits.h. This is the same iteration done by the graph writer.
There are a few minor test changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140908/new/
https://reviews.llvm.org/D140908
More information about the llvm-commits
mailing list