[PATCH] D94435: [SampleFDO] Add the support to split the function profiles with context into separate sections.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 10:31:19 PST 2021


hoy added a comment.

Thanks for working on this which will help the thinLTO throughput. I guess there will be a separate patch to turn on this work, i.e, setting CtxSplitLayout?



================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:462
+  /// postlink phase, only profiles with context will be read.
+  bool IsThinLTOPostLink;
 
----------------
I'm wondering if we can just use one field for the phase it's currently are at. We may also want to check it for fullLTO in the future.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2126
+  if (!F.getEntryCount().hasValue())
+    F.setEntryCount(ProfileCount(initialEntryCount, Function::PCT_Real));
   std::unique_ptr<OptimizationRemarkEmitter> OwnedORE;
----------------
`F` may get a chance to update its entry count with a post-inline count during top-down processing with the default layout. Maybe put this under the check against `SkipNoContextProf`?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D94435



More information about the llvm-commits mailing list