[PATCH] D22356: [ThinLTO] Perform conservative weak/linkonce resolution in distributed backend case

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 20:16:38 PDT 2016


On Mon, Jul 18, 2016 at 7:51 PM, Teresa Johnson <tejohnson at google.com>
wrote:

>
>
> On Mon, Jul 18, 2016 at 5:35 PM, David Li <davidxl at google.com> wrote:
>
>> davidxl added a comment.
>>
>> How about the following solution:
>>
>> 1. in second link, force referencing symbols that are marked as
>> prevailing definitions
>>
>
> Where/how would we add the references?
>

-u<symbol>  linker option which can be put in a command line file  (used as
@<file> )

>
>
>>
>> or
>>
>> 2. for distributed build mode, do not even do prevailing symbol selection
>> in the first link. The side effect is the same as what this patch does --
>> slightly increased object file size (not the final binary size).
>>
>
> We are in essence doing that though with this patch - ignoring the
> prevailing selection from the standpoint of the linkonce/weak
> resolution/optimization. I don't think it otherwise helps to prevent the
> linker from selecting prevailing copy in the first link (ThinLink). I don't
> think the prevailing nature of the symbols is used for anything else in the
> ThinLink (since with thinlto_index_only we exit immediately after producing
> the indexes).
>
> Note that I don't think this will help the case handled by my follow on
> fix D22467.
>

ok.

David

>
>
>>
>> https://reviews.llvm.org/D22356
>>
>>
>>
>>
>
>
> --
> Teresa Johnson |  Software Engineer |  tejohnson at google.com |
> 408-460-2413
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160718/990be88d/attachment.html>


More information about the llvm-commits mailing list