[PATCH] D81981: [PGO] Supplement PGO profile with Sample profile

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 09:50:21 PDT 2020


davidxl added a comment.

I think this feature should be decoupled from the version change -- since this is an approximate anyway.

One way to do this is to use max count or total count as a reference point and compute the scale factor.



================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:446
+    // counters as 0.
+    ProfRecord->Counts[0] = SampleEntryCount * ScaleFactor;
+    return;
----------------
when there is no scaling, setting instr count with sample count does not make sense. Perhaps just set it to be above cold threshold.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D81981





More information about the llvm-commits mailing list