[PATCH] D145171: [FSAFDO] Improve FS discriminator encoding

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 18:05:49 PST 2023


wenlei accepted this revision.
wenlei added a comment.

In D145171#4179258 <https://reviews.llvm.org/D145171#4179258>, @xur wrote:

> In D145171#4174356 <https://reviews.llvm.org/D145171#4174356>, @wenlei wrote:
>
>>> This reduces the hash conflicts.
>>
>> Curious how did you check/detect conflicts/collisions?
>
> Most from eyeballing the change -- I manually look at some functions.
> The other indicator was the number of discriminators created in some lines in templates header.  For some line, we overflow the bits.

I'm wondering if we can have a way to systemically detect and report such cases -- that should make us aware when this is happening which can throttle perf.

>>> one should expect a performance gain over the binary without this change.
>>
>> How big is the gain you saw?
>
> We measured this for a variety of programs -- we are seeing improvement range from 0.7% to 2.0% on top of current FSAFDO.
> The gain usually is higher for iterative profiles. (This is with the BBSize in the hash).

That's quite promising. Just to double check, 0.7%-2.0% was the additional improvement from this patch alone, right? What's the total perf improvement from FSAFDO after this change that you saw? 
We will measure this internally too.

The change looks good, thanks!


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

https://reviews.llvm.org/D145171



More information about the llvm-commits mailing list