From 7d293744a89a21759744c147159343046b8bd924 Mon Sep 17 00:00:00 2001 From: Hongtao Yu Date: Wed, 8 Jun 2022 11:50:19 -0700 Subject: [PATCH] [CSSPGO][Preinliner] Set default value of sample-profile-inline-limit-max to 3000 The default value of sample-profile-inline-limit-max is defined as 10000 in sampleprofile.cpp. This is too big for cspreinliner which works with assembly size instead of IR size. The value 3000 turns out to be a good tradeoff. Compared to the value 10000, 3000 gives as good performance and code size, but lower build time. Reviewed By: wenlei, wlei Differential Revision: https://reviews.llvm.org/D127330 --- llvm/tools/llvm-profgen/CSPreInliner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/tools/llvm-profgen/CSPreInliner.cpp b/llvm/tools/llvm-profgen/CSPreInliner.cpp index 7634ab5..5c7c3d5 100644 --- a/llvm/tools/llvm-profgen/CSPreInliner.cpp +++ b/llvm/tools/llvm-profgen/CSPreInliner.cpp @@ -69,6 +69,8 @@ CSPreInliner::CSPreInliner(SampleProfileMap &Profiles, ProfiledBinary &Binary, SampleHotCallSiteThreshold = 1500; if (!SampleColdCallSiteThreshold.getNumOccurrences()) SampleColdCallSiteThreshold = 0; + if (!ProfileInlineLimitMax.getNumOccurrences()) + ProfileInlineLimitMax = 3000; } std::vector CSPreInliner::buildTopDownOrder() { -- 2.7.4