[llvm-dev] emulated-tls + LTO

Stephen Crane via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 7 11:41:01 PDT 2017


-emulated-tls is particularly interesting for LTO because it is
automatically set by the fronted during compilation for Android and
OpenBSD (see clang lib/Driver/ToolChains/Clang.cpp). At the very
least, perhaps this can be set in tools::AddGoldPlugin as well to keep
the same default behavior under LTO?

- stephen

On Thu, Sep 7, 2017 at 11:36 AM, Peter Collingbourne via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I think that particular option would need to be embedded in the IR. In
> general, if an option is normally passed only at compile time, it would need
> to have some representation in the IR.
>
> Peter
>
> On Thu, Sep 7, 2017 at 10:53 AM, Pirama Arumuga Nainar via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>>
>> The gold plugin supports many of the backend options.  But Clang doesn't
>> pass all of them to the plugin as it does to the backend.
>>
>> For example, to support -emulated-tls with LTO, Clang needs to pass
>> -emulated-tls to the LTO backend.  Shall I just change the driver to add
>> -plugin-opt=-emulated-tls or is the best practice to embed this in the IR?
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>
>
>
> --
> --
> Peter
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list