[patch] Use alias linkage and visibility to decide tls access mode

Reid Kleckner rnk at google.com
Fri May 23 11:47:11 PDT 2014


lgtm


On Fri, May 23, 2014 at 10:39 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> This matches both what we do for the non-thread case and what gcc does.
>
> I found this while looking a the possibility of having a GlobalAlias
> with an aliasee that is an arbitrary ConstantExpr, and therefore with
> no notion of "aliased global".
>
> With this patch clang would match gcc's behaviour in
>
> static __thread int a = 42;
> extern __thread int b __attribute__((alias("a")));
> int *f(void) { return &a; }
> int *g(void) { return &b; }
>
> if not for pr19843. Manually writing the IL does produce the same access
> modes.
>
> It is also a step in the direction of fixing pr19844.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140523/8f870e58/attachment.html>


More information about the llvm-commits mailing list