[PATCH] D23015: [ThinLTO/gold] Conservatively handle unknown GVs when internalizing

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 1 18:35:08 PDT 2016


On Mon, Aug 1, 2016 at 6:17 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

> What about llvm-link? (Possible with -func-import)
>

No, llvm-link does not do ThinLTO internalization. It does do importing,
but note that this issue is on the module being compiled, not on anything
being imported from elsewhere. E.g. the gold internalization, as with
libLTO internalization, occurs before any importing, on the primary module
being compiled through the backend.

>
>
> > On Aug 1, 2016, at 6:10 PM, Teresa Johnson <tejohnson at google.com> wrote:
> >
> > tejohnson added a comment.
> >
> > In https://reviews.llvm.org/D23015#502700, @tejohnson wrote:
> >
> >> In https://reviews.llvm.org/D23015#502330, @mehdi_amini wrote:
> >>
> >>> Do we need gold for the test here or could it be written with an LLVM
> tool?
> >>
> >>
> >> Let me see if I can trigger without gold's symbol resolution
> >
> >
> > Can't trigger with llvm-lto. The gold-plugin uses the IRLinker to move
> the module being compiled (in that ThinLTO backend) into an empty module,
> indicating the ValuesToLink based on its symbol resolution decisions. Which
> is why we get f1 linked in only as a declaration for %t2.o, which means we
> need to create a local copy of it for the use via the alias, resulting in
> the naming conflict with the declaration. In llvm-lto, we simply use the
> module being compiled with a thinlto-action as is.
> >
> >
> > https://reviews.llvm.org/D23015
> >
> >
> >
>
>


-- 
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/20160801/f305611d/attachment.html>


More information about the llvm-commits mailing list