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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to