[llvm] 7d29374 - [CSSPGO][Preinliner] Set default value of sample-profile-inline-limit-max to 3000
Hongtao Yu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 12:10:18 PDT 2022
Author: Hongtao Yu
Date: 2022-06-08T12:10:11-07:00
New Revision: 7d293744a89a21759744c147159343046b8bd924
URL: https://github.com/llvm/llvm-project/commit/7d293744a89a21759744c147159343046b8bd924
DIFF: https://github.com/llvm/llvm-project/commit/7d293744a89a21759744c147159343046b8bd924.diff
LOG: [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
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 7634ab5deed57..5c7c3d5269d35 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<StringRef> CSPreInliner::buildTopDownOrder() {
More information about the llvm-commits
mailing list