[llvm-commits] [LLVMdev] [Patch, RFC] Re: Adding support for explicitly specified TLS models (PR9788)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Jun 12 09:45:59 PDT 2012


> I managed to dig out the original thread for GCC:
> http://gcc.gnu.org/ml/gcc-patches/2002-09/msg00668.html
>
> It doesn't give a rationale for the case we're discussing, though :/
>
> My intuition still tells me that it would be good to separate the
> default and globaldynamic cases to
>
> 1) Respect the user's request: if the user went through the trouble of
> specifying __attribute__((tls_model("globaldynamic"))), we should
> assume there's a reason and give him what he wants, even if we think
> the linker is going to optimize it
> 2) To match GCC's behavior.
>
> I don't have any more compelling reasons than those, and I don't feel
> super strongly about this, so I'm willing to give in if others
> disagree with me :)

I kind of agree with the intuition, but If you don't mind I would
probably ask for something stronger before changing the IL. If we do
find a case where for some reason the compiler cannot optimize the
model, adding a 'default' to the IL should be easy.

Duncan, you know the gcc internals, any thoughts?

> Thanks,
> Hans

Cheers,
Rafael



More information about the llvm-commits mailing list