[llvm] [llvm-profgen] Improve sample profile density (PR #92144)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 21:57:57 PDT 2024


WenleiHe wrote:

> The density is now calculated based on context-sensitive profiles instead of merged profiles. Profiles merged from different contexts could hide low sample issues. For implementation, it leverages the sample context tracker which can fetch the CS profile before the pre-inliner.

As we discussed, since optimization is based on pre-inlined profile, what matters should be the profile density after preinline? If pre-inlined profile has good density, that means optimizations should be able to make reasonably good and stable decisions based on merged profile, even though original full context profile could be of low density. From POV, it makes sense to use pre-inlined profile to compute density? 

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


More information about the llvm-commits mailing list