[llvm] [InlineCost] Disable cost-benefit when sample based PGO is used (PR #86626)

Haohai Wen via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 20:56:43 PDT 2024


HaohaiWen wrote:

Hi, @WenleiHe,
I think MFS should be okay for both IPGO/SPGO. It just split cold BB into cold section based on BPI. Those logic is same for IPGO/SPGO. The difference is BPI quality.
We just found 2 issues of poor BPI quality due to optimization.
1. We found MFS split some HotBB to cold section due to wrong BPI. See #86470. But I believe this issue should also exist for IPGO. There're may be another places with same mistake.
2. Some branch_weight update algorithm may not consider sampling is not absolutely accurate so its algorithm may wrap unsigned leading to big mistake for branch weight: #86496

Both issues are not directly due to flaw in MFS. I think what we need to tune is poor BPI quality. not MFS.
Is it acceptable for you to measure the performance after checking of those two fixes and then decide to land this patch or not?


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


More information about the llvm-commits mailing list