[PATCH] D102537: [SampleFDO] Overwrite branch weight annotated in previous pass.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 17 22:23:47 PDT 2021
hoy added a comment.
In D102537#2763883 <https://reviews.llvm.org/D102537#2763883>, @wenlei wrote:
> In D102537#2762431 <https://reviews.llvm.org/D102537#2762431>, @hoy wrote:
>
>> In D102537#2761666 <https://reviews.llvm.org/D102537#2761666>, @wenlei wrote:
>>
>>> Thanks for bringing this up - it makes sure we give full context profile precedence even when we had to use context-less profile in prelink.
>>>
>>>> When counts are accurate, I was seeing #1 and #2 help reduce code size by preventing post-sample ICP and CGSCC inliner working on obselete metedata.
>>>
>>> I assume the above is from CSSPGO, right?
>>>
>>> It'd be good to call out in the change description as to why postlink overwrite could be beneficial.
>>
>> Yes, they are for CSSPGO.
>>
>>> If we target AutoFDO as well, would be good to mention the impact on AutoFDO too.
>>
>> I haven't tested for non-CS case. In theory it should help there but with a less-than-ideal counts quality, the change may not help in practice.
>
> For future reference, can you make it explicit in the change description: 1) what made this beneficial for CSSPGO (give post-link full context profile precedence over pre-link partial context profile, i.e. be more specific about obsolete metadata); 2) what is the expected impact on AutoFDO.
>
> I think there's another caveat worth calling out, by overwriting all pre-link weights, we would lose the prof metadata adjustment done by prelink opt passes (e.g. prelink loop passes).
Good point, summary updated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102537/new/
https://reviews.llvm.org/D102537
More information about the llvm-commits
mailing list