[PATCH] D21917: ThinLTO: Remove check for multiple modules before applying weak resolutions.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 2 08:09:59 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D21917#472497, @pcc wrote:

> > If there is an exported symbol, then presumably we are linking with another bitcode module (the importing module).
>
>
> I mean exported in the sense of "not internalized". This applies in the case where the symbol is used by the native module, in which case we need to make sure we export it here.


Ah, ok. I was confused by the different uses of the term "exported" in ThinLTO mode. =(

> 

> 

> > libLTO is handling this differently by adding to llvm.compiler.used, for the same reason as mentioned in another review: linkonce -> weak is (was?) pessimizing codegen on MachO.

> 

> 

> Okay, but I'm sure you don't just want this to happen in the case where there is a single ThinLTO module. As the test I am adding in http://reviews.llvm.org/D21915 shows, we are already upgrading to weak.


I don't see this in the test cases in http://reviews.llvm.org/D21915 - one of them (alias_import) has multiple modules, and the other (weak_resolution) we are internalizing in the new case added.

Maybe we need to add a flag to control this behavior, since it seems to need to be different for the different linkers.


http://reviews.llvm.org/D21917





More information about the llvm-commits mailing list