Commit 496324d0 by Dan Nicolaescu Committed by Zack Weinberg

regrename.c (struct du_chain): Use a bitfield for reg_class.

2003-04-09  Dan Nicolaescu  <dann@ics.uci.edu>
	    Zack Weinberg  <zack@codesourcery.com>

	* regrename.c (struct du_chain): Use a bitfield for reg_class.
	* cse.c (struct qty_table_elem, struct table_elt, struct set):
	Use bitfields for fields holding enum rtx_code or
	enum machine_mode values.  Add comments explaining size choices.

From-SVN: r65419
parent 2363a51a
2003-04-09 Dan Nicolaescu <dann@ics.uci.edu>
Zack Weinberg <zack@codesourcery.com>
* regrename.c (struct du_chain): Use a bitfield for reg_class.
* cse.c (struct qty_table_elem, struct table_elt, struct set):
Use bitfields for fields holding enum rtx_code or
enum machine_mode values. Add comments explaining size choices.
2003-04-09 Alexandre Oliva <aoliva@redhat.com> 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
* config/fp-bit.c (unpack_d): Handle pair of doubles with * config/fp-bit.c (unpack_d): Handle pair of doubles with
......
...@@ -251,8 +251,10 @@ struct qty_table_elem ...@@ -251,8 +251,10 @@ struct qty_table_elem
rtx comparison_const; rtx comparison_const;
int comparison_qty; int comparison_qty;
unsigned int first_reg, last_reg; unsigned int first_reg, last_reg;
enum machine_mode mode; /* The sizes of these fields should match the sizes of the
enum rtx_code comparison_code; code and mode fields of struct rtx_def (see rtl.h). */
ENUM_BITFIELD(rtx_code) comparison_code : 16;
ENUM_BITFIELD(machine_mode) mode : 8;
}; };
/* The table of all qtys, indexed by qty number. */ /* The table of all qtys, indexed by qty number. */
...@@ -462,7 +464,9 @@ struct table_elt ...@@ -462,7 +464,9 @@ struct table_elt
struct table_elt *related_value; struct table_elt *related_value;
int cost; int cost;
int regcost; int regcost;
enum machine_mode mode; /* The size of this field should match the size
of the mode field of struct rtx_def (see rtl.h). */
ENUM_BITFIELD(machine_mode) mode : 8;
char in_memory; char in_memory;
char is_const; char is_const;
char flag; char flag;
...@@ -4712,8 +4716,10 @@ struct set ...@@ -4712,8 +4716,10 @@ struct set
/* Nonzero if the SET_SRC contains something /* Nonzero if the SET_SRC contains something
whose value cannot be predicted and understood. */ whose value cannot be predicted and understood. */
char src_volatile; char src_volatile;
/* Original machine mode, in case it becomes a CONST_INT. */ /* Original machine mode, in case it becomes a CONST_INT.
enum machine_mode mode; The size of this field should match the size of the mode
field of struct rtx_def (see rtl.h). */
ENUM_BITFIELD(machine_mode) mode : 8;
/* A constant equivalent for SET_SRC, if any. */ /* A constant equivalent for SET_SRC, if any. */
rtx src_const; rtx src_const;
/* Original SET_SRC value used for libcall notes. */ /* Original SET_SRC value used for libcall notes. */
......
...@@ -51,7 +51,7 @@ struct du_chain ...@@ -51,7 +51,7 @@ struct du_chain
rtx insn; rtx insn;
rtx *loc; rtx *loc;
enum reg_class class; ENUM_BITFIELD(reg_class) class : 16;
unsigned int need_caller_save_reg:1; unsigned int need_caller_save_reg:1;
unsigned int earlyclobber:1; unsigned int earlyclobber:1;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment