[llvm-dev] Enabling LTO for new target

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 30 08:30:31 PST 2018


On Mon, Jan 29, 2018 at 10:29 PM, Siddharth Shankar Swain <
h2015096 at pilani.bits-pilani.ac.in> wrote:

> yeah  so when  LTO runs, in the linker, it uses the target to produce
> object code. In the sense of code generation for target arch.
>

The linker invokes the LTO code which is in LLVM itself, and this just
invokes the standard code generation code
(LLVMTargetMachine::addPassesToEmitFile). So you shouldn't need to do
anything specific to add support for a new target with LTO/ThinLTO.

Teresa

Thanks,
> Siddharth
>
> On Mon, Jan 29, 2018 at 11:03 PM, Teresa Johnson <tejohnson at google.com>
> wrote:
>
>> Can you be more specific? LTO/ThinLTO are target independent. You just
>> need to be using a linker that supports *LTO (gold, lld, ld64, eg).
>> Teresa
>>
>>
>> On Sun, Jan 28, 2018 at 9:04 PM, Siddharth Shankar Swain via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Hi,
>>> Can anyone guide on how to enable  LTO and Thin LTO  for a new backend
>>> target ?
>>> Thanks,
>>> Siddharth
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>>
>>
>>
>> --
>> Teresa Johnson |  Software Engineer |  tejohnson at google.com |
>> 408-460-2413 <(408)%20460-2413>
>>
>
>


-- 
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-dev/attachments/20180130/f28bd170/attachment.html>


More information about the llvm-dev mailing list