[PATCH] D140949: [MemProf] Context disambiguation cloning pass [patch 2/3]
Snehasish Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 13 11:29:59 PST 2023
snehasish added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/PGHOContextDisambiguation.cpp:634
+ EI = Node->CalleeEdges.erase(EI);
+ // Save edges for later deletion, as they may be saved in data structures.
+ RemovedEdges.insert(Edge);
----------------
Should we use shared_ptr for edges so that we don't have to manually track ownership?
================
Comment at: llvm/lib/Transforms/IPO/PGHOContextDisambiguation.cpp:1959
+ // that is arbitrary, and we assert in that case below.
+ unsigned AllocTypeCloningPriority[] = {/*None*/ 3, /*NotCold*/ 4, /*Cold*/ 1,
+ /*NotColdCold*/ 2};
----------------
nit: constexpr
================
Comment at: llvm/lib/Transforms/IPO/PGHOContextDisambiguation.cpp:2006
+ AllocTypesMatch(CalleeEdgeAllocTypesForCallerEdge, Node->CalleeEdges)) {
+ ++EI;
+ continue;
----------------
Still trying to understand this but it wasn't clear to me how we terminate this loop if we only increment the iterator here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140949/new/
https://reviews.llvm.org/D140949
More information about the llvm-commits
mailing list