aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2003-04-10 05:24:26 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-04-10 05:24:26 +0000
commit496324d0a723cb9f3aa8fd82d114e74c4bd08834 (patch)
tree461b3e6e929a2561f52acdd1f7f238f6a8fe775e /gcc/cse.c
parent2363a51aeec978c105c9cff741d176a099a3eb10 (diff)
downloadgcc-496324d0a723cb9f3aa8fd82d114e74c4bd08834.zip
gcc-496324d0a723cb9f3aa8fd82d114e74c4bd08834.tar.gz
gcc-496324d0a723cb9f3aa8fd82d114e74c4bd08834.tar.bz2
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
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 4109b58..a90f0d8 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -251,8 +251,10 @@ struct qty_table_elem
rtx comparison_const;
int comparison_qty;
unsigned int first_reg, last_reg;
- enum machine_mode mode;
- enum rtx_code comparison_code;
+ /* The sizes of these fields should match the sizes of the
+ 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. */
@@ -462,7 +464,9 @@ struct table_elt
struct table_elt *related_value;
int cost;
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 is_const;
char flag;
@@ -4712,8 +4716,10 @@ struct set
/* Nonzero if the SET_SRC contains something
whose value cannot be predicted and understood. */
char src_volatile;
- /* Original machine mode, in case it becomes a CONST_INT. */
- enum machine_mode mode;
+ /* Original machine mode, in case it becomes a CONST_INT.
+ 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. */
rtx src_const;
/* Original SET_SRC value used for libcall notes. */