[PATCH] D147013: [CSSPGO][Preinliner] Trim cold call edges of the profiled call graph for a more stable profile generation.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 16:57:05 PDT 2023
hoy added inline comments.
================
Comment at: llvm/tools/llvm-profgen/CSPreInliner.cpp:84
+ // profile from run to run.
+ uint64_t ColdCountThreshold = ProfileSummaryBuilder::getColdCountThreshold(
+ (Summary->getDetailedSummary()));
----------------
wenlei wrote:
> I understand that you want to do this only for preinliner, not for sample loader in compiler. But the current way of doing this - exposing internals of profiled calll graph only for users to tweak the actual graph, is less than idea as it breaks the abstraction.
>
> Can we have a separate parameter (i.e. hotCallonly) for ctor of ProfiledCallGraph, so this is all self contained? And perhaps slight more efficient as it avoids add and then removal.
I can pass in the threshold and do the trimming in place inside `ProfiledCallGraph`, wdyt?
Perhaps we have to add the edges first and then remove the cold ones after the weight accumulation is done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147013/new/
https://reviews.llvm.org/D147013
More information about the llvm-commits
mailing list