Re: debuggability of recog_data

2013-05-17 Thread Richard Biener
On Thu, May 16, 2013 at 11:04 PM, H.J. Lu hjl.to...@gmail.com wrote:
 On Thu, May 16, 2013 at 2:02 PM, Richard Sandiford
 rdsandif...@googlemail.com wrote:
 Steven Bosscher stevenb@gmail.com writes:
 On Wed, May 15, 2013 at 12:14 AM, Mike Stump wrote:
 I don't what to bike shed.  So, I'm happy if the next poor soul that
 touches it just does so.  If people like recog_data_info, I'd be happy
 to change it to that.  Let's give then peanut gallery a day to vote on
 it.  :-)

 Usually we append _d or _def to structure definitions, so 
 recog_data_def?

 Gah, I wrote the patch from memory and forgot about the bit after the comma.
 I'm not trying to be contrary really. :-)

 Bootstrapped  regression-tested on x86_64-linux-gnu.  OK to install?

 Thanks,
 Richard


 gcc/
 * recog.h (Recog_data): Rename to...
 (recog_data_t): ...this.
 ^^^
 It should be recog_data_d.

Ok with that change.

Thanks,
Richard.


 --
 H.J.


Re: debuggability of recog_data

2013-05-16 Thread Richard Sandiford
Steven Bosscher stevenb@gmail.com writes:
 On Wed, May 15, 2013 at 12:14 AM, Mike Stump wrote:
 I don't what to bike shed.  So, I'm happy if the next poor soul that
 touches it just does so.  If people like recog_data_info, I'd be happy
 to change it to that.  Let's give then peanut gallery a day to vote on
 it.  :-)

 Usually we append _d or _def to structure definitions, so recog_data_def?

Gah, I wrote the patch from memory and forgot about the bit after the comma.
I'm not trying to be contrary really. :-)

Bootstrapped  regression-tested on x86_64-linux-gnu.  OK to install?

Thanks,
Richard


gcc/
* recog.h (Recog_data): Rename to...
(recog_data_t): ...this.
(recog_data): Update accordingly.
* recog.c (recog_data): Likewise.
* reload.c (save_recog_data): Likewise.
* config/picochip/picochip.c (picochip_saved_recog_data): Likewise.
(picochip_save_recog_data, picochip_restore_recog_data): Likewise.

Index: gcc/config/picochip/picochip.c
===
--- gcc/config/picochip/picochip.c  2013-05-15 20:11:29.433232045 +0100
+++ gcc/config/picochip/picochip.c  2013-05-16 19:46:08.317740846 +0100
@@ -187,7 +187,7 @@ struct vliw_state picochip_current_vliw_
 
 /* Save/restore recog_data. */
 static int picochip_saved_which_alternative;
-static struct Recog_data picochip_saved_recog_data;
+static struct recog_data_d picochip_saved_recog_data;
 
 /* Determine which ALU to use for the instruction in
picochip_current_prescan_insn. */
@@ -3150,7 +3150,7 @@ picochip_save_recog_data (void)
 {
   picochip_saved_which_alternative = which_alternative;
   memcpy (picochip_saved_recog_data, recog_data,
- sizeof (struct Recog_data));
+ sizeof (struct recog_data_d));
 }
 
 /* Restore some of the contents of global variable recog_data. */
@@ -3159,7 +3159,7 @@ picochip_restore_recog_data (void)
 {
   which_alternative = picochip_saved_which_alternative;
   memcpy (recog_data, picochip_saved_recog_data,
- sizeof (struct Recog_data));
+ sizeof (struct recog_data_d));
 }
 
 /* Ensure that no var tracking notes are emitted in the middle of a
Index: gcc/recog.c
===
--- gcc/recog.c 2013-05-15 20:11:26.453211775 +0100
+++ gcc/recog.c 2013-05-16 19:45:18.317837923 +0100
@@ -70,7 +70,7 @@ static rtx split_insn (rtx);
 
 int volatile_ok;
 
-struct Recog_data recog_data;
+struct recog_data_d recog_data;
 
 /* Contains a vector of operand_alternative structures for every operand.
Set up by preprocess_constraints.  */
Index: gcc/recog.h
===
--- gcc/recog.h 2013-05-15 20:11:27.507218945 +0100
+++ gcc/recog.h 2013-05-16 19:43:40.498441810 +0100
@@ -179,7 +179,7 @@ skip_alternative (const char *p)
 
 /* The following vectors hold the results from insn_extract.  */
 
-struct Recog_data
+struct recog_data_d
 {
   /* It is very tempting to make the 5 operand related arrays into a
  structure and index on that.  However, to be source compatible
@@ -245,7 +245,7 @@ struct Recog_data
   rtx insn;
 };
 
-extern struct Recog_data recog_data;
+extern struct recog_data_d recog_data;
 
 /* Contains a vector of operand_alternative structures for every operand.
Set up by preprocess_constraints.  */
Index: gcc/reload.c
===
--- gcc/reload.c2013-05-15 20:11:21.368177166 +0100
+++ gcc/reload.c2013-05-16 19:45:48.018116702 +0100
@@ -895,7 +895,7 @@ can_reload_into (rtx in, int regno, enum
 {
   rtx dst, test_insn;
   int r = 0;
-  struct Recog_data save_recog_data;
+  struct recog_data_d save_recog_data;
 
   /* For matching constraints, we often get notional input reloads where
  we want to use the original register as the reload register.  I.e.


Re: debuggability of recog_data

2013-05-16 Thread H.J. Lu
On Thu, May 16, 2013 at 2:02 PM, Richard Sandiford
rdsandif...@googlemail.com wrote:
 Steven Bosscher stevenb@gmail.com writes:
 On Wed, May 15, 2013 at 12:14 AM, Mike Stump wrote:
 I don't what to bike shed.  So, I'm happy if the next poor soul that
 touches it just does so.  If people like recog_data_info, I'd be happy
 to change it to that.  Let's give then peanut gallery a day to vote on
 it.  :-)

 Usually we append _d or _def to structure definitions, so recog_data_def?

 Gah, I wrote the patch from memory and forgot about the bit after the comma.
 I'm not trying to be contrary really. :-)

 Bootstrapped  regression-tested on x86_64-linux-gnu.  OK to install?

 Thanks,
 Richard


 gcc/
 * recog.h (Recog_data): Rename to...
 (recog_data_t): ...this.
^^^
It should be recog_data_d.


--
H.J.


debuggability of recog_data

2013-05-14 Thread Mike Stump
Here is a trivial patch that improves the debuggability of recog_data.  Without 
this p recog_data in gdb on linux, didn't seem to work at all.  My fingers were 
not amused.  :-)

Checked it in a obvious.

2013-05-14  Mike Stump  mikest...@comcast.net

* recog.h: Rename struct recog_data to Recog_data.
* recog.c: Likewise.
* reload.c (can_reload_into): Likewise.
* config/picochip/picochip.c: Likewise.

Index: config/picochip/picochip.c
===
--- config/picochip/picochip.c  (revision 198896)
+++ config/picochip/picochip.c  (working copy)
@@ -187,7 +187,7 @@ struct vliw_state picochip_current_vliw_
 
 /* Save/restore recog_data. */
 static int picochip_saved_which_alternative;
-static struct recog_data picochip_saved_recog_data;
+static struct Recog_data picochip_saved_recog_data;
 
 /* Determine which ALU to use for the instruction in
picochip_current_prescan_insn. */
@@ -3150,7 +3150,7 @@ picochip_save_recog_data (void)
 {
   picochip_saved_which_alternative = which_alternative;
   memcpy (picochip_saved_recog_data, recog_data,
- sizeof (struct recog_data));
+ sizeof (struct Recog_data));
 }
 
 /* Restore some of the contents of global variable recog_data. */
@@ -3159,7 +3159,7 @@ picochip_restore_recog_data (void)
 {
   which_alternative = picochip_saved_which_alternative;
   memcpy (recog_data, picochip_saved_recog_data,
- sizeof (struct recog_data));
+ sizeof (struct Recog_data));
 }
 
 /* Ensure that no var tracking notes are emitted in the middle of a
Index: recog.c
===
--- recog.c (revision 198896)
+++ recog.c (working copy)
@@ -70,7 +70,7 @@ static rtx split_insn (rtx);
 
 int volatile_ok;
 
-struct recog_data recog_data;
+struct Recog_data recog_data;
 
 /* Contains a vector of operand_alternative structures for every operand.
Set up by preprocess_constraints.  */
Index: recog.h
===
--- recog.h (revision 198896)
+++ recog.h (working copy)
@@ -179,7 +179,7 @@ extern int which_alternative;
 
 /* The following vectors hold the results from insn_extract.  */
 
-struct recog_data
+struct Recog_data
 {
   /* It is very tempting to make the 5 operand related arrays into a
  structure and index on that.  However, to be source compatible
@@ -245,7 +245,7 @@ struct recog_data
   rtx insn;
 };
 
-extern struct recog_data recog_data;
+extern struct Recog_data recog_data;
 
 /* Contains a vector of operand_alternative structures for every operand.
Set up by preprocess_constraints.  */
Index: reload.c
===
--- reload.c(revision 198896)
+++ reload.c(working copy)
@@ -895,7 +895,7 @@ can_reload_into (rtx in, int regno, enum
 {
   rtx dst, test_insn;
   int r = 0;
-  struct recog_data save_recog_data;
+  struct Recog_data save_recog_data;
 
   /* For matching constraints, we often get notional input reloads where
  we want to use the original register as the reload register.  I.e.
--


Re: debuggability of recog_data

2013-05-14 Thread Richard Sandiford
Mike Stump mikest...@comcast.net writes:
 2013-05-14  Mike Stump  mikest...@comcast.net

   * recog.h: Rename struct recog_data to Recog_data.
   * recog.c: Likewise.
   * reload.c (can_reload_into): Likewise.
   * config/picochip/picochip.c: Likewise.

I like the idea, but Recog_data just isn't GNU.  Which means it's
time to bikeshed over a different name.  Would something boring like
recog_data_info be OK?

Thanks,
Richard


Re: debuggability of recog_data

2013-05-14 Thread Mike Stump
On May 14, 2013, at 3:01 PM, Richard Sandiford rdsandif...@googlemail.com 
wrote:
 Mike Stump mikest...@comcast.net writes:
 2013-05-14  Mike Stump  mikest...@comcast.net
 
  * recog.h: Rename struct recog_data to Recog_data.
  * recog.c: Likewise.
  * reload.c (can_reload_into): Likewise.
  * config/picochip/picochip.c: Likewise.
 
 I like the idea, but Recog_data just isn't GNU.  Which means it's
 time to bikeshed over a different name.  Would something boring like
 recog_data_info be OK?

I don't what to bike shed.  So, I'm happy if the next poor soul that touches it 
just does so.  If people like recog_data_info, I'd be happy to change it to 
that.  Let's give then peanut gallery a day to vote on it.  :-)

Re: debuggability of recog_data

2013-05-14 Thread Steven Bosscher
On Wed, May 15, 2013 at 12:14 AM, Mike Stump wrote:
 I don't what to bike shed.  So, I'm happy if the next poor soul that touches 
 it just does so.  If people like recog_data_info, I'd be happy to change it 
 to that.  Let's give then peanut gallery a day to vote on it.  :-)

Usually we append _d or _def to structure definitions, so recog_data_def?

Otherwise: orange. Obviously.

Ciao!
Steven