[PATCH] D147013: [CSSPGO][Preinliner] Trim cold call edges of the profiled call graph for a more stable profile generation.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 10:11:35 PDT 2023


wenlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/CSPreInliner.cpp:84
+      (Summary->getDetailedSummary()));
+  ProfiledCallGraph ProfiledCG(ContextTracker, ColdCountThreshold + 1);
 
----------------
hoy wrote:
> wenlei wrote:
> > why is +1 needed? if cold threshold is 0, nothing is cold, and we filter out nothing -- it just works? 
> There are still zero-weight edges coming from callstack unwinding and they do not show up in the profile. I think. we want to trim them.
what I meant is if cold threshold is already zero anyways, that would mean nothing is cold. so nothing should be trimmed. Usually cold threshold is never zero, in which case all those zero-weight edges will be trimmed without +1.


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