[PATCH] D140949: [MemProf] Context disambiguation cloning pass [patch 2/3]
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 19:03:41 PDT 2023
tejohnson marked 2 inline comments as done.
tejohnson added a comment.
Finished rebasing the patch on the earlier commits.
================
Comment at: llvm/lib/Transforms/IPO/PGHOContextDisambiguation.cpp:2006
+ AllocTypesMatch(CalleeEdgeAllocTypesForCallerEdge, Node->CalleeEdges)) {
+ ++EI;
+ continue;
----------------
snehasish wrote:
> Still trying to understand this but it wasn't clear to me how we terminate this loop if we only increment the iterator here?
See the calls to moveEdgeTo*CalleeClone below which takes the iterator. The current edge is erased from the iterator which is thus advanced. Mostly we terminate the loop when after enough cloning the Node has a single alloc type (see the break up near the top of the loop). Added a comment above the loop, and above the calls to moveEdgeTo* below.
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