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

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 17:46:24 PDT 2021


wlei added inline comments.


================
Comment at: llvm/lib/ProfileData/SampleProf.cpp:335
+    uint32_t ColdContextFrameLength, bool TrimBaseProfileOnly) {
   if (!TrimColdContext && !MergeColdContext)
     return;
----------------
hoy wrote:
> 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.
Makes sense.

I was thinking if we could reuse this for non-CS cold profile trimming(we have that in our internal patch). in that case, it's the same logic as `TrimBaseProfileOnly ` = true. Anyway, that should be another patch. thanks!


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