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

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 17:15:49 PDT 2024


WenleiHe wrote:

With CSSPGO, SampleProfileLoader can be more than a reply inliner. 

> Otherwise we don't need Inliner Pass when enable Sample Profile Loader.

Not really. Sample loader inlining has its limitation as it's early in the pipeline so a lot of simplification hasn't happened yet, for that reason sample loader inlining may not be complete. A later inliner (CGSCC or ModuleInliner) helps clean things up more. 

> As long as prof data of SPGO has similar quality as IPGO, I think it's safe to enable it by default.

This needs to be backed by data. Also it is known that sample PGO has inferior profile quality than IRPGO, so the assumption isn't true. 

> Have you observed overall regression for your workloads? Is regression possibly due to inaccurate profile data?

Yes, the regression is not specific to one service. See comments above from @helloguo 

There is also concern about code size increase as mentioned by another comment. We'll revert this patch. In general, changing default like this needs to be backed by more data and vetted by stakeholders. 

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


More information about the llvm-commits mailing list