[PATCH] D94435: [SampleFDO] Add the support to split the function profiles with context into separate sections.

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 09:45:19 PST 2021


wmi added a comment.

In D94435#2495298 <https://reviews.llvm.org/D94435#2495298>, @wenlei wrote:

> Thanks for the change.
>
>> If the profile is large, it is better to split the profile into two parts, one with context and one without, so the profile reading in postlink phase only has to read the part with context.
>
> I guess the speed up is more visible with merged partial profile with explicit profile flattening? or did you see it speed up FDO with regular full profile too? For a regular FDO profile, I'd expect most function profiles to have some context except for really small functions..

Right, it is more visible with merged partial profile. Currently the speedup with regular profile is minor. However, we saw in an experiment that by keeping context for the hottest functions and flattened the rest of the warm/cold functions in regular FDO profile can shrink profile size significantly without hurting performance. That is only an experiment for one target. We havn't done evaluation for other targets because regular full profile size is not a major issue for us for the moment. But if we can have the same conclusion for more targets, we can flatten more functions in the profile and the profile splitting will be more effective to reduce profile reading cost in LTO/ThinLTO postlink.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94435/new/

https://reviews.llvm.org/D94435



More information about the llvm-commits mailing list