[llvm] 39eb1c6 - [CSSPGO][Preinliner] Set default value of sample-profile-inline-limit-max to 50000.

Hongtao Yu via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 09:17:59 PST 2023


Author: Hongtao Yu
Date: 2023-02-13T09:17:50-08:00
New Revision: 39eb1c6145eb3b2a0f1738b7122e0c65533b2505

URL: https://github.com/llvm/llvm-project/commit/39eb1c6145eb3b2a0f1738b7122e0c65533b2505
DIFF: https://github.com/llvm/llvm-project/commit/39eb1c6145eb3b2a0f1738b7122e0c65533b2505.diff

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

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 dissasembly size. 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.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D143696

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-profgen/CSPreInliner.cpp b/llvm/tools/llvm-profgen/CSPreInliner.cpp
index dbc5bc7327d5c..54e86401a863e 100644
--- a/llvm/tools/llvm-profgen/CSPreInliner.cpp
+++ b/llvm/tools/llvm-profgen/CSPreInliner.cpp
@@ -69,7 +69,7 @@ CSPreInliner::CSPreInliner(SampleContextTracker &Tracker,
   if (!SampleColdCallSiteThreshold.getNumOccurrences())
     SampleColdCallSiteThreshold = 0;
   if (!ProfileInlineLimitMax.getNumOccurrences())
-    ProfileInlineLimitMax = 3000;
+    ProfileInlineLimitMax = 50000;
 }
 
 std::vector<StringRef> CSPreInliner::buildTopDownOrder() {


        


More information about the llvm-commits mailing list