[CFT, try 8] Emulated tls rewrite

Richard Henderson rth@redhat.com
Mon Jul 19 19:42:00 GMT 2010


This should be really close to the final version.

I've eliminated a couple of the hacks that remained in v7.  In particular, all of the
GC'd data from v7 is now localized to the IPA pass.  Which means that I no longer have
to have a hack in varpool.c to avoid a ggc_free call.  There are almost no references
to emulated tls remaining outside tree-emutls.c.

The one remaining hack is localized to one line in dwarf2out.c.  If a target arranges
with gdb the meaning of DW_OP_form_tls_address, as vxworks apparently does, then we
need some way to associate the original TLS variable with its control variable.  I
accomplish this by storing the control variable in DECL_VALUE_EXPR.

At first this sounds gross, but I had already been storing a non-null value in
DECL_VALUE_EXPR as a way to indicate to generic verify code that TLS variables should
no longer appear in gimple code.  To a greater or lesser extent DECL_VALUE_EXPR is 
also a way to communicate a complicated storage location for a DECL with the debug
output routines.  The only difference here is that I don't store the entire call
expression and dereference as well.  Given that we're already special-casing TLS
variables, this doesn't seem so bad after all.


r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: emutls-8
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100719/2b63959b/attachment.ksh>


More information about the Gcc-patches mailing list