Skip to content

Commit

Permalink
[CSSPGO][Preinliner] Set default value of sample-profile-inline-limit…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
htyu committed Jun 8, 2022
1 parent 060907d commit 7d29374
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/tools/llvm-profgen/CSPreInliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7d29374

Please sign in to comment.