From 496324d0a723cb9f3aa8fd82d114e74c4bd08834 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 10 Apr 2003 05:24:26 +0000 Subject: regrename.c (struct du_chain): Use a bitfield for reg_class. 2003-04-09 Dan Nicolaescu Zack Weinberg * 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 --- gcc/cse.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gcc/cse.c') 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. */ -- cgit v1.1