[PATCH] D112489: [CSSPGO] Trim cold profiles with the CS preinliner.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 17:28:00 PDT 2021


hoy added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:335
+    uint32_t ColdContextFrameLength, bool TrimBaseProfileOnly) {
   if (!TrimColdContext && !MergeColdContext)
     return;
----------------
wlei wrote:
> what if `TrimBaseProfileOnly` is true but those two are false, shall we skip the trim?
> 
> maybe change to `if (!TrimColdContext && !MergeColdContext && !TrimBaseProfileOnly)`
`TrimBaseProfileOnly` should only be effective when `TrimColdContext` is true. Trimming means to trim cold profile. On top of that we can choose to trim all cold profiles or only base cold profiles. Does that make sense? I can add a comment for that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112489/new/

https://reviews.llvm.org/D112489



More information about the llvm-commits mailing list