This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 07/08/2010 12:07 PM, IainS wrote:
On 8 Jul 2010, at 00:22, Richard Henderson wrote:Do you really need this kind of thing anymore, since you're exposing the use of the control variable so early? I would have thought that varpool.c would no longer need any special-casing for !have_tls.
this is my understanding (which might be flawed &| incomplete).
Whilst we are on the parse side - and building varpool & cgraph, the
relationship is not fully exposed (that happens when gimplication is done).
So my reasoning was that the "ghost/proxy" vars should be made to track
the user-land ones until then.
Hmm. So what you're saying is that there's extra cleanup work that needs to happen while lowering the representation. It's not merely a matter of code substitution during gimplification.
Known Minus: it fails the regression Jakub pointed out.
Known Plus: it allows lto it actually performs better on CSE than trunk does (test added).
In which case I wonder if it wouldn't be better to do as Honza suggested and separate all of this out into a new pass_lower_emutls. Perhaps to be placed just after pass_lower_vector. That placement is before pass_build_cgraph_edges, which I believe means you would not have to fix up the cgraph edges for the new function calls. All you'd need to do is transform the tls variable references and fix up the varpool references.
PR target/44132 * expr.c (emutls_var_address): Remove. (expand_expr_addr_expr_1): Remove TLS emulation hook. (expand_expr_real_1): Ditto.
* gimplify.c (emutls_var_address): Add proc. (gimplify_decl_expr): expand TLS vars. (gimplify_var_or_parm_decl): Ditto. (omp_notice_variable): Recognize TLS_MODEL_EMULATED.
testsuite: PR target/44132 * gcc.dg/tls/thr-init-1.c: New. * gcc.dg/tls/thr-init-2.c: New. * gcc.dg/torture/tls New. * gcc.dg/torture/tls/tls-test.c: New. * gcc.dg/torture/tls/thr-init-1.c: New. * gcc.dg/torture/tls/tls.exp: New. * gcc.dg/torture/tls/thr-init-2.c: New.
* lib/target-supports.exp (check_effective_target_tls_emulated): New. * gcc.dg/tls/thr-cse-1.c: New.
Attachment:
161974-emutls-lto.txt
Description: Text document
Attachment:
161974-emutls-lto-testsuite.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |