[llvm-commits] [PATCH] Implement local-dynamic TLS model for x86 (PR3985)

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jun 1 07:18:21 PDT 2012


> Comments welcome :)

Thanks for working on this and sorry for taking so long to look at it.
I have not worked on TLS ever since creating that FIXME :-)

The description of MO_TLSLD{M} is not very clear. It effectively
evaluates the to a base address that is the same for every symbol in a
module, right?

With this patch we create a local dynamic access even if there is a
single __thread variable in use in a function, right? That is probably
OK, but a test documenting it and maybe a FIXME to optimize it back to
general dynamic would be nice (or if you benchmarked it to be better,
note so on the test).

If you put TLS_base_addr32 after TLS_addr32 you can reused the "let ..
in", no? Same for the 64 bit version.

Can you add the testcase in PR3985? I noticed that the code we produce
is still not as good as GCC as we have an extra copy. That is probably
a register allocator deficiency, but the testcase is a good home for a
FIXME about it.

LGTM with those changes.

> Thanks,
> Hans

Thanks,
Rafael



More information about the llvm-commits mailing list