[LLVMdev] RFC: ThinLTO Impementation Plan

Duncan P. N. Exon Smith dexonsmith at apple.com
Thu May 14 15:19:09 PDT 2015


>> On 2015-May-14, at 14:46, Eric Christopher <echristo at gmail.com> wrote:
>> 
>> >>
>> >> But as mentioned, ld -r can work on native object wrapped bitcode
>> >> without a plugin as well.
>> >>
>> >
>> > How? It's not like any partial linking is going to go on inside the bitcode
>> > if the linker doesn't understand bitcode.
>> 
>> It allows us to delay the actual linking until the full link step,
>> thereby enabling ThinLTO on those modules.
>> 
>> As we discussed offline, the current ld -r behavior with the plugin is
>> to compile all the way down to machine code. The alternative if we use
>> straight bitcode is to tell the plugin to stop early after combining
>> the bitcode and emit bitcode back out, with the thinlto function info
>> also combined.
> 
> 
> I think this is what should happen anyhow. ld -r that doesn't do a partial link is misleading.

FWIW, in "full" LTO on Darwin, ld64 emits bitcode from `ld -r` as long
as all inputs are bitcode.



More information about the llvm-dev mailing list