[llvm] [Sample Profile] Check hot callsite threshold when inlining a function with a sample profile (PR #93286)

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 17:52:44 PDT 2024


david-xl wrote:

> > > inlining is guaranteed to be bounded by the inlining done in the previous build.
> > 
> > 
> > That's not necessarily true for subsequent builds we do modify the sample profile (merging, downsampling etc.). Using a profile that does not completely obtained from the matching binary does result in under-optimization as expected, but it should not cause a significant compile time increase.
> 
> Actually when using merged profile, long compile time is quite common. I know that both of us use the practice of merging a bunch of profiles from different top services to drive PGO of some long tail services. A merged profile make optimization less selective, which usually lead to size bloat and longer compile time. For that reason, we are moving away from that practice.
> 
> All that said, I'm ok with this change if you can measure performance on a server workload to make sure it won't regress perf.

yes, I believe it is due to the merged inline behavior from the merged profile.

https://github.com/llvm/llvm-project/pull/93286


More information about the llvm-commits mailing list