2007-xx-xx Richard Sandiford <rsandifo@nildram.co.uk>
authorRichard Sandiford <rsandifo@nildram.co.uk>
Fri, 27 Jul 2007 07:16:15 +0000 (07:16 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 27 Jul 2007 07:16:15 +0000 (07:16 +0000)
    Richard Guenther <rguenther@suse.de>

gcc/
* df.h (df_mw_hardreg): Turn df_ref_type and df_ref_flags
into bitfields.
(df_ref): Likewise.  Put regno with other integer fields.

From-SVN: r126971

gcc/ChangeLog
gcc/df.h

index 4865f2b..db34fcd 100644 (file)
@@ -1,5 +1,11 @@
 2007-07-27  Richard Sandiford  <rsandifo@nildram.co.uk>
 
+       * df.h (df_mw_hardreg): Turn df_ref_type and df_ref_flags
+       into bitfields.
+       (df_ref): Likewise.  Put regno with other integer fields.
+
+2007-07-27  Richard Sandiford  <rsandifo@nildram.co.uk>
+
        * df.h (df_mw_hardreg): Remove "loc" field.
        * df-scan.c (df_ref_record): Don't set it.  Remove redundant
        local variable.
index 7740431..2547286 100644 (file)
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -311,8 +311,12 @@ struct dataflow
 struct df_mw_hardreg
 {
   rtx mw_reg;                   /* The multiword hardreg.  */ 
-  enum df_ref_type type;        /* Used to see if the ref is read or write.  */
-  enum df_ref_flags flags;     /* Various flags.  */
+  /* These two bitfields are intentially oversized, in the hope that
+     accesses to 16-bit fields will usually be quicker.  */
+  ENUM_BITFIELD(df_ref_type) type : 16;
+                               /* Used to see if the ref is read or write.  */
+  ENUM_BITFIELD(df_ref_flags) flags : 16;
+                               /* Various flags.  */
   unsigned int start_regno;     /* First word of the multi word subreg.  */
   unsigned int end_regno;       /* Last word of the multi word subreg.  */
   unsigned int mw_order;        /* Same as df_ref.ref_order.  */
@@ -341,7 +345,6 @@ struct df_insn_info
 struct df_ref
 {
   rtx reg;                     /* The register referenced.  */
-  unsigned int regno;           /* The register number referenced.  */
   basic_block bb;               /* Basic block containing the instruction. */
 
   /* Insn containing ref. This will be null if this is an artificial
@@ -356,8 +359,13 @@ struct df_ref
      used to totally order the refs in an insn.  */
   unsigned int ref_order;
 
-  enum df_ref_type type;       /* Type of ref.  */
-  enum df_ref_flags flags;     /* Various flags.  */
+  unsigned int regno;          /* The register number referenced.  */
+  /* These two bitfields are intentially oversized, in the hope that
+     accesses to 16-bit fields will usually be quicker.  */
+  ENUM_BITFIELD(df_ref_type) type : 16;
+                               /* Type of ref.  */
+  ENUM_BITFIELD(df_ref_flags) flags : 16;
+                               /* Various flags.  */
 
   /* For each regno, there are three chains of refs, one for the uses,
      the eq_uses and the defs.  These chains go thru the refs