[PATCH] D143696: [CSSPGO][Preinliner] Set default value of sample-profile-inline-limit-max to 50000.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 17:53:36 PST 2023


hoy created this revision.
Herald added subscribers: modimo, wenlei.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The previous threshold 3000 is too small to enable any inlining for giant functions which come in with bigger size than that. In real world, I've seen a big hot function with 34000 assembly instructions. Motivated by that I'm changing the value to 50000.

With the new value the allowance size growth should still be reasonable, as it is also bounded by another threshold, i.e, --sample-profile-inline-growth-limit , which defaults to 12. The new value should mostly only affect giant functions.

I've seen for serveral internal services, the new threshold boosts performance, and it has neutral impact for other services without hot giant functions. So far I haven't seen any performance regression with that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143696

Files:
  llvm/tools/llvm-profgen/CSPreInliner.cpp


Index: llvm/tools/llvm-profgen/CSPreInliner.cpp
===================================================================
--- llvm/tools/llvm-profgen/CSPreInliner.cpp
+++ llvm/tools/llvm-profgen/CSPreInliner.cpp
@@ -69,7 +69,7 @@
   if (!SampleColdCallSiteThreshold.getNumOccurrences())
     SampleColdCallSiteThreshold = 0;
   if (!ProfileInlineLimitMax.getNumOccurrences())
-    ProfileInlineLimitMax = 3000;
+    ProfileInlineLimitMax = 50000;
 }
 
 std::vector<StringRef> CSPreInliner::buildTopDownOrder() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143696.496301.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230210/e71de48f/attachment.bin>


More information about the llvm-commits mailing list