This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Remove rt_bit from rtunion_def


Hi,

The rt_bit field of rtunion_def is unused.  The last users were the
RANGE_INFO and RANGE_LIVE rtx definitions:

rtl.def:DEF_RTL_EXPR(RANGE_INFO, "range_info", "uuEiiiiiibbii", 'x')
rtl.def:DEF_RTL_EXPR(RANGE_LIVE, "range_live", "bi", 'x')

But these were never used in an FSF GCC and removed ~6 years ago by:
2004-09-03  Jan Hubicka  <jh at suse dot cz>

        * rtl.def (RANGE_INFO, RANGE_REG, RANGE_VAR, RANGE_LIVE): Kill.

The attached patch removes the unused field.  I also verified that the
users of GET_RTX_FORMAT never look at it ('b' is handled not anywhere).

Bootstrapped&tested on x86_64-unknown-linux-gnu.
OK for trunk?

Ciao!
Steven

	* rtl.h (union rtunion_def): Remove rt_bit member.
	(XBITMAP, X0BITMAP, XCBITMAP): Remove.
	* print-rtl (print_rtx): Do not print the member.
	* gengtype.c (adjust_field_rtx_def): Do not handle it.
	* gengenrtl.c (type_from_format): Likewise.
	(accessor_from_format): Likewise.

Index: rtl.h
===================================================================
--- rtl.h	(revision 159694)
+++ rtl.h	(working copy)
@@ -174,7 +174,6 @@ union rtunion_def
   enum machine_mode rt_type;
   addr_diff_vec_flags rt_addr_diff_vec_flags;
   struct cselib_val_struct *rt_cselib;
-  struct bitmap_head_def *rt_bit;
   tree rt_tree;
   struct basic_block_def *rt_bb;
   mem_attrs *rt_mem;
@@ -705,7 +704,6 @@ extern void rtl_check_failed_flag (const char *, c
 #define XEXP(RTX, N)	(RTL_CHECK2 (RTX, N, 'e', 'u').rt_rtx)
 #define XVEC(RTX, N)	(RTL_CHECK2 (RTX, N, 'E', 'V').rt_rtvec)
 #define XMODE(RTX, N)	(RTL_CHECK1 (RTX, N, 'M').rt_type)
-#define XBITMAP(RTX, N) (RTL_CHECK1 (RTX, N, 'b').rt_bit)
 #define XTREE(RTX, N)   (RTL_CHECK1 (RTX, N, 't').rt_tree)
 #define XBBDEF(RTX, N)	(RTL_CHECK1 (RTX, N, 'B').rt_bb)
 #define XTMPL(RTX, N)	(RTL_CHECK1 (RTX, N, 'T').rt_str)
@@ -722,7 +720,6 @@ extern void rtl_check_failed_flag (const char *, c
 #define X0EXP(RTX, N)	   (RTL_CHECK1 (RTX, N, '0').rt_rtx)
 #define X0VEC(RTX, N)	   (RTL_CHECK1 (RTX, N, '0').rt_rtvec)
 #define X0MODE(RTX, N)	   (RTL_CHECK1 (RTX, N, '0').rt_type)
-#define X0BITMAP(RTX, N)   (RTL_CHECK1 (RTX, N, '0').rt_bit)
 #define X0TREE(RTX, N)	   (RTL_CHECK1 (RTX, N, '0').rt_tree)
 #define X0BBDEF(RTX, N)	   (RTL_CHECK1 (RTX, N, '0').rt_bb)
 #define X0ADVFLAGS(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_addr_diff_vec_flags)
@@ -740,7 +737,6 @@ extern void rtl_check_failed_flag (const char *, c
 #define XCEXP(RTX, N, C)      (RTL_CHECKC1 (RTX, N, C).rt_rtx)
 #define XCVEC(RTX, N, C)      (RTL_CHECKC1 (RTX, N, C).rt_rtvec)
 #define XCMODE(RTX, N, C)     (RTL_CHECKC1 (RTX, N, C).rt_type)
-#define XCBITMAP(RTX, N, C)   (RTL_CHECKC1 (RTX, N, C).rt_bit)
 #define XCTREE(RTX, N, C)     (RTL_CHECKC1 (RTX, N, C).rt_tree)
 #define XCBBDEF(RTX, N, C)    (RTL_CHECKC1 (RTX, N, C).rt_bb)
 #define XCCSELIB(RTX, N, C)   (RTL_CHECKC1 (RTX, N, C).rt_cselib)
Index: print-rtl.c
===================================================================
--- print-rtl.c	(revision 159694)
+++ print-rtl.c	(working copy)
@@ -512,16 +512,6 @@ print_rtx (const_rtx in_rtx)
 	sawclose = 0;
 	break;

-      case 'b':
-#ifndef GENERATOR_FILE
-	if (XBITMAP (in_rtx, i) == NULL)
-	  fputs (" {null}", outfile);
-	else
-	  bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
-#endif
-	sawclose = 0;
-	break;
-
       case 't':
 #ifndef GENERATOR_FILE
 	dump_addr (outfile, " ", XTREE (in_rtx, i));
Index: gengtype.c
===================================================================
--- gengtype.c	(revision 159694)
+++ gengtype.c	(working copy)
@@ -1008,7 +1008,7 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUS
   options_p nodot;
   int i;
   type_p rtx_tp, rtvec_tp, tree_tp, mem_attrs_tp, note_union_tp, scalar_tp;
-  type_p bitmap_tp, basic_block_tp, reg_attrs_tp, constant_tp, symbol_union_tp;
+  type_p basic_block_tp, reg_attrs_tp, constant_tp, symbol_union_tp;

   if (t->kind != TYPE_UNION)
     {
@@ -1024,7 +1024,6 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUS
   tree_tp = create_pointer (find_structure ("tree_node", 1));
   mem_attrs_tp = create_pointer (find_structure ("mem_attrs", 0));
   reg_attrs_tp = create_pointer (find_structure ("reg_attrs", 0));
-  bitmap_tp = create_pointer (find_structure ("bitmap_element_def", 0));
   basic_block_tp = create_pointer (find_structure ("basic_block_def", 0));
   constant_tp = create_pointer (find_structure ("constant_descriptor_rtx", 0));
   scalar_tp = &scalar_nonchar;  /* rtunion int */
@@ -1171,11 +1170,6 @@ adjust_field_rtx_def (type_p t, options_p ARG_UNUS
 	      subname = "rt_tree";
 	      break;

-	    case 'b':
-	      t = bitmap_tp;
-	      subname = "rt_bit";
-	      break;
-
 	    case 'B':
 	      t = basic_block_tp;
 	      subname = "rt_bb";
Index: gengenrtl.c
===================================================================
--- gengenrtl.c	(revision 159694)
+++ gengenrtl.c	(working copy)
@@ -76,8 +76,6 @@ type_from_format (int c)

     case 'E':
       return "rtvec ";
-    case 'b':
-      return "struct bitmap_head_def *";  /* bitmap - typedef not available */
     case 't':
       return "union tree_node *";  /* tree - typedef not available */
     case 'B':
@@ -109,9 +107,6 @@ accessor_from_format (int c)
     case 'E':
       return "XVEC";

-    case 'b':
-      return "XBITMAP";
-
     case 't':
       return "XTREE";


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]