diff mbox

RFA: Fix other/44644

Message ID 20100623093328.9yj0z602ok00oosg-nzlynne@webmail.spamcop.net
State New
Headers show

Commit Message

Joern Rennecke June 23, 2010, 1:33 p.m. UTC
By renaming the struct tags df and insn_data to df_d and insn_data_d,
respectively, gdb again understands what is a type and what is a variable.
2010-06-23  Joern Rennecke  <joern.rennecke@embecosm.com>

	* df-core.c (struct df): Rename to df_d.
	* df.h (struct df): Likewise.
	* dse.h (struct df): Remove forward declaration.
	* recog.h (struct insn_data): Rename to:
	(struct_insn_data_d).  Adjusted all users.

Comments

Joern Rennecke June 23, 2010, 1:40 p.m. UTC | #1
Quoting Joern Rennecke <amylaar@spamcop.net>:

> By renaming the struct tags df and insn_data to df_d and insn_data_d,
> respectively, gdb again understands what is a type and what is a variable.

Bootstrapped & regression tested on i686-pc-linux-gnu in revision 161269.
Richard Biener June 23, 2010, 2:02 p.m. UTC | #2
On Wed, Jun 23, 2010 at 3:33 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
> By renaming the struct tags df and insn_data to df_d and insn_data_d,
> respectively, gdb again understands what is a type and what is a variable.

Ok if bootstrapped & tested.

Richard.

> 2010-06-23  Joern Rennecke  <joern.rennecke@embecosm.com>
>
>        * df-core.c (struct df): Rename to df_d.
>        * df.h (struct df): Likewise.
>        * dse.h (struct df): Remove forward declaration.
>        * recog.h (struct insn_data): Rename to:
>        (struct_insn_data_d).  Adjusted all users.
>
> Index: gcc/builtins.c
> ===================================================================
> --- gcc/builtins.c      (revision 161269)
> +++ gcc/builtins.c      (working copy)
> @@ -3554,7 +3554,7 @@ expand_movstr (tree dest, tree src, rtx
>   rtx dest_mem;
>   rtx src_mem;
>   rtx insn;
> -  const struct insn_data * data;
> +  const struct insn_data_d * data;
>
>   if (!HAVE_movstr)
>     return NULL_RTX;
> Index: gcc/genoutput.c
> ===================================================================
> --- gcc/genoutput.c     (revision 161269)
> +++ gcc/genoutput.c     (working copy)
> @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.
>  /* This program reads the machine description for the compiler target
> machine
>    and produces a file containing these things:
>
> -   1. An array of `struct insn_data', which is indexed by insn code number,
> +   1. An array of `struct insn_data_d', which is indexed by insn code
> number,
>    which contains:
>
>      a. `name' is the name for that pattern.  Nameless patterns are
> @@ -293,7 +293,7 @@ output_insn_data (void)
>       }
>
>   printf ("#if GCC_VERSION >= 2007\n__extension__\n#endif\n");
> -  printf ("\nconst struct insn_data insn_data[] = \n{\n");
> +  printf ("\nconst struct insn_data_d insn_data[] = \n{\n");
>
>   for (d = idata; d; d = d->next)
>     {
> Index: gcc/df-core.c
> ===================================================================
> --- gcc/df-core.c       (revision 161269)
> +++ gcc/df-core.c       (working copy)
> @@ -415,7 +415,7 @@ bitmap_obstack df_bitmap_obstack;
>   Functions to create, destroy and manipulate an instance of df.
>  ----------------------------------------------------------------------------*/
>
> -struct df *df;
> +struct df_d *df;
>
>  /* Add PROBLEM (and any dependent problems) to the DF instance.  */
>
> @@ -704,7 +704,7 @@ static unsigned int
>  rest_of_handle_df_initialize (void)
>  {
>   gcc_assert (!df);
> -  df = XCNEW (struct df);
> +  df = XCNEW (struct df_d);
>   df->changeable_flags = 0;
>
>   bitmap_obstack_initialize (&df_bitmap_obstack);
> Index: gcc/recog.h
> ===================================================================
> --- gcc/recog.h (revision 161269)
> +++ gcc/recog.h (working copy)
> @@ -275,7 +275,7 @@ struct insn_operand_data
>  #define INSN_OUTPUT_FORMAT_MULTI       2       /* const char * const * */
>  #define INSN_OUTPUT_FORMAT_FUNCTION    3       /* const char * (*)(...) */
>
> -struct insn_data
> +struct insn_data_d
>  {
>   const char *const name;
>  #if HAVE_DESIGNATED_INITIALIZERS
> @@ -300,5 +300,5 @@ struct insn_data
>   const char output_format;
>  };
>
> -extern const struct insn_data insn_data[];
> +extern const struct insn_data_d insn_data[];
>  extern int peep2_current_count;
> Index: gcc/dse.h
> ===================================================================
> --- gcc/dse.h   (revision 161269)
> +++ gcc/dse.h   (working copy)
> @@ -23,8 +23,6 @@ along with GCC; see the file COPYING3.
>  #ifndef GCC_DSE_H
>  #define GCC_DSE_H
>
> -struct df;
> -
>  extern void dse_record_singleton_alias_set (alias_set_type, enum
> machine_mode);
>  extern void dse_invalidate_singleton_alias_set (alias_set_type);
>
> Index: gcc/df.h
> ===================================================================
> --- gcc/df.h    (revision 161269)
> +++ gcc/df.h    (working copy)
> @@ -34,7 +34,7 @@ along with GCC; see the file COPYING3.
>  #include "timevar.h"
>
>  struct dataflow;
> -struct df;
> +struct df_d;
>  struct df_problem;
>  struct df_link;
>  struct df_insn_info;
> @@ -527,7 +527,7 @@ struct df_reg_info
>    used by owners of the problem.
>  ----------------------------------------------------------------------------*/
>
> -struct df
> +struct df_d
>  {
>
>   /* The set of problems to be solved is stored in two arrays.  In
> @@ -877,7 +877,7 @@ struct df_byte_lr_bb_info
>  /* This is used for debugging and for the dumpers to find the latest
>    instance so that the df info can be added to the dumps.  This
>    should not be used by regular code.  */
> -extern struct df *df;
> +extern struct df_d *df;
>  #define df_scan    (df->problems_by_index[DF_SCAN])
>  #define df_rd      (df->problems_by_index[DF_RD])
>  #define df_lr      (df->problems_by_index[DF_LR])
> Index: gcc/expmed.c
> ===================================================================
> --- gcc/expmed.c        (revision 161269)
> +++ gcc/expmed.c        (working copy)
> @@ -301,7 +301,7 @@ negate_rtx (enum machine_mode mode, rtx
>  enum machine_mode
>  mode_for_extraction (enum extraction_pattern pattern, int opno)
>  {
> -  const struct insn_data *data;
> +  const struct insn_data_d *data;
>
>   switch (pattern)
>     {
> Index: gcc/config/mep/mep.c
> ===================================================================
> --- gcc/config/mep/mep.c        (revision 161269)
> +++ gcc/config/mep/mep.c        (working copy)
> @@ -6329,7 +6329,7 @@ mep_expand_builtin (tree exp, rtx target
>   unsigned int n_args;
>   tree fnname;
>   const struct cgen_insn *cgen_insn;
> -  const struct insn_data *idata;
> +  const struct insn_data_d *idata;
>   unsigned int first_arg = 0;
>   tree return_type = void_type_node;
>   unsigned int builtin_n_args;
> @@ -7209,7 +7209,7 @@ bool
>  mep_emit_intrinsic (int intrinsic, const rtx *operands)
>  {
>   const struct cgen_insn *cgen_insn;
> -  const struct insn_data *idata;
> +  const struct insn_data_d *idata;
>   rtx newop[10];
>   int i;
>
> Index: gcc/config/i386/i386.c
> ===================================================================
> --- gcc/config/i386/i386.c      (revision 161269)
> +++ gcc/config/i386/i386.c      (working copy)
> @@ -23683,7 +23683,7 @@ ix86_expand_args_builtin (const struct b
>     } args[4];
>   bool last_arg_count = false;
>   enum insn_code icode = d->icode;
> -  const struct insn_data *insn_p = &insn_data[icode];
> +  const struct insn_data_d *insn_p = &insn_data[icode];
>   enum machine_mode tmode = insn_p->operand[0].mode;
>   enum machine_mode rmode = VOIDmode;
>   bool swap = false;
> @@ -24077,7 +24077,7 @@ ix86_expand_special_args_builtin (const
>     } args[3];
>   enum insn_code icode = d->icode;
>   bool last_arg_constant = false;
> -  const struct insn_data *insn_p = &insn_data[icode];
> +  const struct insn_data_d *insn_p = &insn_data[icode];
>   enum machine_mode tmode = insn_p->operand[0].mode;
>   enum { load, store } klass;
>
>
>
Tom Tromey June 23, 2010, 4 p.m. UTC | #3
>>>>> "Joern" == Joern Rennecke <amylaar@spamcop.net> writes:

Joern> By renaming the struct tags df and insn_data to df_d and
Joern> insn_data_d, respectively, gdb again understands what is a type
Joern> and what is a variable.

Please file this in gdb bugzilla.  gdb should not be confused about this
any more than the compiler is.

Tom
diff mbox

Patch

Index: gcc/builtins.c
===================================================================
--- gcc/builtins.c	(revision 161269)
+++ gcc/builtins.c	(working copy)
@@ -3554,7 +3554,7 @@  expand_movstr (tree dest, tree src, rtx 
   rtx dest_mem;
   rtx src_mem;
   rtx insn;
-  const struct insn_data * data;
+  const struct insn_data_d * data;
 
   if (!HAVE_movstr)
     return NULL_RTX;
Index: gcc/genoutput.c
===================================================================
--- gcc/genoutput.c	(revision 161269)
+++ gcc/genoutput.c	(working copy)
@@ -22,7 +22,7 @@  along with GCC; see the file COPYING3.  
 /* This program reads the machine description for the compiler target machine
    and produces a file containing these things:
 
-   1. An array of `struct insn_data', which is indexed by insn code number,
+   1. An array of `struct insn_data_d', which is indexed by insn code number,
    which contains:
 
      a. `name' is the name for that pattern.  Nameless patterns are
@@ -293,7 +293,7 @@  output_insn_data (void)
       }
 
   printf ("#if GCC_VERSION >= 2007\n__extension__\n#endif\n");
-  printf ("\nconst struct insn_data insn_data[] = \n{\n");
+  printf ("\nconst struct insn_data_d insn_data[] = \n{\n");
 
   for (d = idata; d; d = d->next)
     {
Index: gcc/df-core.c
===================================================================
--- gcc/df-core.c	(revision 161269)
+++ gcc/df-core.c	(working copy)
@@ -415,7 +415,7 @@  bitmap_obstack df_bitmap_obstack;
   Functions to create, destroy and manipulate an instance of df.
 ----------------------------------------------------------------------------*/
 
-struct df *df;
+struct df_d *df;
 
 /* Add PROBLEM (and any dependent problems) to the DF instance.  */
 
@@ -704,7 +704,7 @@  static unsigned int
 rest_of_handle_df_initialize (void)
 {
   gcc_assert (!df);
-  df = XCNEW (struct df);
+  df = XCNEW (struct df_d);
   df->changeable_flags = 0;
 
   bitmap_obstack_initialize (&df_bitmap_obstack);
Index: gcc/recog.h
===================================================================
--- gcc/recog.h	(revision 161269)
+++ gcc/recog.h	(working copy)
@@ -275,7 +275,7 @@  struct insn_operand_data
 #define INSN_OUTPUT_FORMAT_MULTI	2	/* const char * const * */
 #define INSN_OUTPUT_FORMAT_FUNCTION	3	/* const char * (*)(...) */
 
-struct insn_data
+struct insn_data_d
 {
   const char *const name;
 #if HAVE_DESIGNATED_INITIALIZERS
@@ -300,5 +300,5 @@  struct insn_data
   const char output_format;
 };
 
-extern const struct insn_data insn_data[];
+extern const struct insn_data_d insn_data[];
 extern int peep2_current_count;
Index: gcc/dse.h
===================================================================
--- gcc/dse.h	(revision 161269)
+++ gcc/dse.h	(working copy)
@@ -23,8 +23,6 @@  along with GCC; see the file COPYING3.  
 #ifndef GCC_DSE_H
 #define GCC_DSE_H
 
-struct df;
-
 extern void dse_record_singleton_alias_set (alias_set_type, enum machine_mode);
 extern void dse_invalidate_singleton_alias_set (alias_set_type);
 
Index: gcc/df.h
===================================================================
--- gcc/df.h	(revision 161269)
+++ gcc/df.h	(working copy)
@@ -34,7 +34,7 @@  along with GCC; see the file COPYING3.  
 #include "timevar.h"
 
 struct dataflow;
-struct df;
+struct df_d;
 struct df_problem;
 struct df_link;
 struct df_insn_info;
@@ -527,7 +527,7 @@  struct df_reg_info
    used by owners of the problem.
 ----------------------------------------------------------------------------*/
 
-struct df
+struct df_d
 {
 
   /* The set of problems to be solved is stored in two arrays.  In
@@ -877,7 +877,7 @@  struct df_byte_lr_bb_info
 /* This is used for debugging and for the dumpers to find the latest
    instance so that the df info can be added to the dumps.  This
    should not be used by regular code.  */
-extern struct df *df;
+extern struct df_d *df;
 #define df_scan    (df->problems_by_index[DF_SCAN])
 #define df_rd      (df->problems_by_index[DF_RD])
 #define df_lr      (df->problems_by_index[DF_LR])
Index: gcc/expmed.c
===================================================================
--- gcc/expmed.c	(revision 161269)
+++ gcc/expmed.c	(working copy)
@@ -301,7 +301,7 @@  negate_rtx (enum machine_mode mode, rtx 
 enum machine_mode
 mode_for_extraction (enum extraction_pattern pattern, int opno)
 {
-  const struct insn_data *data;
+  const struct insn_data_d *data;
 
   switch (pattern)
     {
Index: gcc/config/mep/mep.c
===================================================================
--- gcc/config/mep/mep.c	(revision 161269)
+++ gcc/config/mep/mep.c	(working copy)
@@ -6329,7 +6329,7 @@  mep_expand_builtin (tree exp, rtx target
   unsigned int n_args;
   tree fnname;
   const struct cgen_insn *cgen_insn;
-  const struct insn_data *idata;
+  const struct insn_data_d *idata;
   unsigned int first_arg = 0;
   tree return_type = void_type_node;
   unsigned int builtin_n_args;
@@ -7209,7 +7209,7 @@  bool
 mep_emit_intrinsic (int intrinsic, const rtx *operands)
 {
   const struct cgen_insn *cgen_insn;
-  const struct insn_data *idata;
+  const struct insn_data_d *idata;
   rtx newop[10];
   int i;
 
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 161269)
+++ gcc/config/i386/i386.c	(working copy)
@@ -23683,7 +23683,7 @@  ix86_expand_args_builtin (const struct b
     } args[4];
   bool last_arg_count = false;
   enum insn_code icode = d->icode;
-  const struct insn_data *insn_p = &insn_data[icode];
+  const struct insn_data_d *insn_p = &insn_data[icode];
   enum machine_mode tmode = insn_p->operand[0].mode;
   enum machine_mode rmode = VOIDmode;
   bool swap = false;
@@ -24077,7 +24077,7 @@  ix86_expand_special_args_builtin (const 
     } args[3];
   enum insn_code icode = d->icode;
   bool last_arg_constant = false;
-  const struct insn_data *insn_p = &insn_data[icode];
+  const struct insn_data_d *insn_p = &insn_data[icode];
   enum machine_mode tmode = insn_p->operand[0].mode;
   enum { load, store } klass;