Patchwork Remove unused tree_decl_with_vis field - thread_local

login
register
mail settings
Submitter Jakub Jelinek
Date Feb. 5, 2013, 3:44 p.m.
Message ID <20130205154431.GN4385@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/218282/
State New
Headers show

Comments

Jakub Jelinek - Feb. 5, 2013, 3:44 p.m.
Hi!

Got a bugreport that gcc plugins can't be compiled with -std=c++11,
seems the reason why not is badly named bitfield that is never used
anyway.  From what I've seen in CVS history, thread_local_flag
was first removed by
2005-06-30  Steven Bosscher  <stevenb@suse.de>

        * tree.h (struct tree_decl): New field `tls_model'.
        (DECL_TLS_MODEL): New.
        (DECL_THREAD_LOCAL_P): Rename from DECL_THREAD_LOCAL, make it
        a predicate.
(DECL_THREAD_LOCAL_P tests tls_model since then), but later on reappeared
2005-07-08  Daniel Berlin  <dberlin@dberlin.org>

...
        (struct tree_decl_minimal): New structure.
        (struct tree_decl_common): Ditto.
        (struct tree_decl_with_rtl): Ditto.
        (struct tree_decl_with_vis): Ditto.
supposedly because that patch has been written already before the 2005-06-30
change and didn't take the removal into account properly.

So, this patch just removes that unused bitfield.
Ok for trunk?

2013-02-05  Jakub Jelinek  <jakub@redhat.com>

	* tree.h (struct tree_decl_with_vis): Remove thread_local field.


	Jakub
Richard Guenther - Feb. 5, 2013, 3:46 p.m.
On Tue, 5 Feb 2013, Jakub Jelinek wrote:

> Hi!
> 
> Got a bugreport that gcc plugins can't be compiled with -std=c++11,
> seems the reason why not is badly named bitfield that is never used
> anyway.  From what I've seen in CVS history, thread_local_flag
> was first removed by
> 2005-06-30  Steven Bosscher  <stevenb@suse.de>
> 
>         * tree.h (struct tree_decl): New field `tls_model'.
>         (DECL_TLS_MODEL): New.
>         (DECL_THREAD_LOCAL_P): Rename from DECL_THREAD_LOCAL, make it
>         a predicate.
> (DECL_THREAD_LOCAL_P tests tls_model since then), but later on reappeared
> 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
> 
> ...
>         (struct tree_decl_minimal): New structure.
>         (struct tree_decl_common): Ditto.
>         (struct tree_decl_with_rtl): Ditto.
>         (struct tree_decl_with_vis): Ditto.
> supposedly because that patch has been written already before the 2005-06-30
> change and didn't take the removal into account properly.
> 
> So, this patch just removes that unused bitfield.
> Ok for trunk?

Ok.

Thanks,
Richard.

> 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* tree.h (struct tree_decl_with_vis): Remove thread_local field.
> 
> --- gcc/tree.h.jj	2013-01-11 09:02:33.000000000 +0100
> +++ gcc/tree.h	2013-02-05 15:27:30.331437092 +0100
> @@ -3198,13 +3198,14 @@ struct GTY(()) tree_decl_with_vis {
>   /* Belong to VAR_DECL exclusively.  */
>   unsigned defer_output : 1;
>   unsigned hard_register : 1;
> - unsigned thread_local : 1;
>   unsigned common_flag : 1;
>   unsigned in_text_section : 1;
>   unsigned in_constant_pool : 1;
>   unsigned dllimport_flag : 1;
>   /* Don't belong to VAR_DECL exclusively.  */
>   unsigned weak_flag : 1;
> + /* When SECTION_NAME is implied by -ffunction-section.  */
> + unsigned implicit_section_name_p : 1;
>  
>   unsigned seen_in_bind_expr : 1;
>   unsigned comdat_flag : 1;
> @@ -3217,9 +3218,7 @@ struct GTY(()) tree_decl_with_vis {
>   unsigned init_priority_p : 1;
>   /* Used by C++ only.  Might become a generic decl flag.  */
>   unsigned shadowed_for_var_p : 1;
> - /* When SECTION_NAME is implied by -ffunsection-section.  */
> - unsigned implicit_section_name_p : 1;
> - /* 13 unused bits. */
> + /* 14 unused bits. */
>  };
>  
>  extern tree decl_debug_expr_lookup (tree);
> 
> 	Jakub
> 
>

Patch

--- gcc/tree.h.jj	2013-01-11 09:02:33.000000000 +0100
+++ gcc/tree.h	2013-02-05 15:27:30.331437092 +0100
@@ -3198,13 +3198,14 @@  struct GTY(()) tree_decl_with_vis {
  /* Belong to VAR_DECL exclusively.  */
  unsigned defer_output : 1;
  unsigned hard_register : 1;
- unsigned thread_local : 1;
  unsigned common_flag : 1;
  unsigned in_text_section : 1;
  unsigned in_constant_pool : 1;
  unsigned dllimport_flag : 1;
  /* Don't belong to VAR_DECL exclusively.  */
  unsigned weak_flag : 1;
+ /* When SECTION_NAME is implied by -ffunction-section.  */
+ unsigned implicit_section_name_p : 1;
 
  unsigned seen_in_bind_expr : 1;
  unsigned comdat_flag : 1;
@@ -3217,9 +3218,7 @@  struct GTY(()) tree_decl_with_vis {
  unsigned init_priority_p : 1;
  /* Used by C++ only.  Might become a generic decl flag.  */
  unsigned shadowed_for_var_p : 1;
- /* When SECTION_NAME is implied by -ffunsection-section.  */
- unsigned implicit_section_name_p : 1;
- /* 13 unused bits. */
+ /* 14 unused bits. */
 };
 
 extern tree decl_debug_expr_lookup (tree);