[PATCH] D14623: [ThinLTO] Comdat importing fixes and related cleanup

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 11:55:07 PST 2015


On Mon, Nov 30, 2015 at 11:43 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> The above is what we will end up with either the existing module
>> linker code (which converts the alias f() to a decl immediately when
>> the prototypes are linked) and with this patch (which converts the
>> alias to a decl after lazy linking is complete). I moved the import of
>> f() to a later conversion to decl since with the patch we may decide
>> to lazy link additional comdat groups and don't know whether the
>> aliasee f2() is imported here until after lazy linking is complete.
>> Even with your recent change to not allow importing aliases to
>> available_externally functions, if the aliasee were linkonce we could
>> import it and leave f() as an alias to the imported f2().
>
> How is that so? The aliasee is in the same comdat as the alias. We
> either decide to include both or none.

We may not be importing the defs of f/f2. And we link global value
protos before we know the full set of comdat groups that are needed to
be imported with this patch. So we see an alias whose proto is being
linked, and it may or may not need to end up as an alias (def).

Teresa

>
> Cheers,
> Rafael



-- 
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413


More information about the llvm-commits mailing list