[PATCH] D110422: [AIX] Enable PGO without LTO

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 24 13:03:32 PDT 2021


MaskRay added a comment.

In D110422#3021572 <https://reviews.llvm.org/D110422#3021572>, @jsji wrote:

> In D110422#3021535 <https://reviews.llvm.org/D110422#3021535>, @MaskRay wrote:
>
>> The description is still unclear.
>>
>> Say a.o has a weak `foo, __profc_foo, __profd_foo`, b.o has a weak `foo, __profc_foo, __profd_foo`.
>> The linker picks the definitions from `a.o`. In the PGO implementation, it doesn't whether the non-discarded b.o `__profd_foo` has garbage value.
>
> We have 3 sets weak symbols here: weak_func, profc_weak_foo, profd_weak_func. We can't ensure that binder always choose 3 of them from same object.

Oh, this is a serious enough bug. I am not sure working around the bug by switching to `PrivateLinkage` will help.
The values will be wrong as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110422



More information about the cfe-commits mailing list