[PATCH] D124632: [CSSPGO] Turn on priority inlining for probe-only profile

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 16:58:33 PDT 2022


hoy added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2035-2038
+      if (!ProfileInlineLimitMin.getNumOccurrences())
+        ProfileInlineLimitMin = std::numeric_limits<unsigned>::max();
+      if (!ProfileInlineLimitMax.getNumOccurrences())
+        ProfileInlineLimitMax = std::numeric_limits<unsigned>::max();
----------------
wenlei wrote:
> Do we also need to clear ProfileInlineGrowthLimit here? 
That one is used as a multiplier. Giving it a large value may cause overflow, so not sure what is a good value to give.

     unsigned SizeLimit = F.getInstructionCount() * ProfileInlineGrowthLimit;
     SizeLimit = std::min(SizeLimit, (unsigned)ProfileInlineLimitMax);
     SizeLimit = std::max(SizeLimit, (unsigned)ProfileInlineLimitMin);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124632



More information about the llvm-commits mailing list