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

Haohai Wen via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 23:52:15 PST 2024


HaohaiWen wrote:

If I recall correctly, SampleProfileLoader only try to inline functions which were inlined before SPGO.
e.g. Before SPGO,
```
B, C was inlined by A. 
D was not inlined by A but D is very small and hot.
```
SampleProfileLoader will only try to inline B, C to A based on profile data. It will never try to inline D to A. Otherwise we don't need Inliner Pass when enable Sample Profile Loader.

As long as prof data of SPGO has similar quality as IPGO, I think it's safe to enable it by default.
I think MFS (machine function splitter) is disabled by default. Is your regression due to split non-cold BB from function by MFS?
Have you observed overall regression for your workloads? Is regression due to inaccurate profile data?



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


More information about the llvm-commits mailing list