[llvm] [InlineCost] Enable the cost benefit analysis for Sample PGO (PR #66457)

Xiangyang Guo via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 08:57:39 PST 2024


helloguo wrote:

> Will cost-threshold use PGO profile data as hint to inline?

Yes, profile data is used to update the threshold, which can impact the inlining decision.

> Is there any reason why SPGO can't use cost-benefit analysis?

It's nice that inliners have different options (e.g. all the inlining flags, and cost-benefit v.s. cost-threshold) to try out. However, the impact of one option depends on many factors. In this particular case, those factors may include profile quality, and implementation details such as `inline-savings-multiplier`. Inliners can use cost-benefit or any other options when sample pgo is used. But enabling it by default is another story. Given this change will impact everyone who is using sample pgo, it would be nice to have a good amount of testing on benchmarks and applications before enabling it by default.

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


More information about the llvm-commits mailing list