[PATCH] D67579: [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 20:32:36 PDT 2019


On Tue, Sep 17, 2019 at 4:25 PM Rong Xu <xur at google.com> wrote:

> +cc David
>
> On Tue, Sep 17, 2019 at 3:20 PM Reid Kleckner via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> rnk added a comment.
>>
>> From what I understand, the comdat group isn't necessary, so I disabled
>> it on COFF in r372182. Can we simplify ELF to match?
>>
>
Putting prof sections with the function in the same comdat group is
probably not needed. There might be some weird interaction with GC and
instrumentation binary size. If we don't see issues there, it is ok to
simplify ELF to match.  Rong can help with some internal testing (instr
build size, performance etc) on internal large app with linux.

David


> It's probably OK without setting COMDAT for the variables in ELF as the
> linkonce_odr  linkage can be used to remove the duplicates.
> On the other hand, it's nature to set the COMDAT to sync the
> declaration of the function.
> I'm CCing david to see what is his thoughts.
>
> -Rong
>
>>
>>
>> Repository:
>>   rL LLVM
>>
>> CHANGES SINCE LAST ACTION
>>   https://reviews.llvm.org/D67579/new/
>>
>> https://reviews.llvm.org/D67579
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190917/26b0a017/attachment.html>


More information about the llvm-commits mailing list