From 39eb1c6145eb3b2a0f1738b7122e0c65533b2505 Mon Sep 17 00:00:00 2001 From: Hongtao Yu Date: Thu, 9 Feb 2023 17:48:53 -0800 Subject: [PATCH] [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 --- llvm/tools/llvm-profgen/CSPreInliner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-profgen/CSPreInliner.cpp b/llvm/tools/llvm-profgen/CSPreInliner.cpp index dbc5bc7..54e8640 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 CSPreInliner::buildTopDownOrder() { -- 2.7.4