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] dwarf2out.c: VECify used_rtx_varray.


Hi,

Attached is a patch to VECify used_rtx_varray.

Since used_rtx_varray won't be a VARRAY after the conversion, I
changed the name to used_rtx_array.

Tested on i686-pc-linux-gnu.  I'll wait for 24 hours just in case
before I'll check in this patch.

Kazu Hirata

2005-05-15  Kazu Hirata  <kazu@cs.umass.edu>

	* dwarf2out.c (used_rtx_varray): Rename to used_rtx_array.
	Change the type to VEC(rtx,gc)*.
	(mem_loc_descriptor, add_const_value_attributes,
	dwarf2out_init): Adjust uses of used_rtx_varray.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.593
diff -u -d -p -r1.593 dwarf2out.c
--- dwarf2out.c	9 May 2005 20:20:21 -0000	1.593
+++ dwarf2out.c	14 May 2005 13:24:48 -0000
@@ -170,9 +170,12 @@ default_eh_frame_section (void)
 #endif
 }
 
+DEF_VEC_P(rtx);
+DEF_VEC_ALLOC_P(rtx,gc);
+
 /* Array of RTXes referenced by the debugging information, which therefore
    must be kept around forever.  */
-static GTY(()) varray_type used_rtx_varray;
+static GTY(()) VEC(rtx,gc) *used_rtx_array;
 
 /* A pointer to the base of a list of incomplete types which might be
    completed at some later time.  incomplete_types_list needs to be a
@@ -8680,7 +8683,7 @@ mem_loc_descriptor (rtx rtl, enum machin
       mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
       mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
       mem_loc_result->dw_loc_oprnd1.v.val_addr = rtl;
-      VARRAY_PUSH_RTX (used_rtx_varray, rtl);
+      VEC_safe_push (rtx, gc, used_rtx_array, rtl);
       break;
 
     case PRE_MODIFY:
@@ -9772,7 +9775,7 @@ add_const_value_attribute (dw_die_ref di
     case LABEL_REF:
     case CONST:
       add_AT_addr (die, DW_AT_const_value, rtl);
-      VARRAY_PUSH_RTX (used_rtx_varray, rtl);
+      VEC_safe_push (rtx, gc, used_rtx_array, rtl);
       break;
 
     case PLUS:
@@ -10660,7 +10663,7 @@ add_name_and_src_coords_attributes (dw_d
     {
       add_AT_addr (die, DW_AT_VMS_rtnbeg_pd_address,
 		   XEXP (DECL_RTL (decl), 0));
-      VARRAY_PUSH_RTX (used_rtx_varray, XEXP (DECL_RTL (decl), 0));
+      VEC_safe_push (tree, gc, used_rtx_array, XEXP (DECL_RTL (decl), 0));
     }
 #endif
 }
@@ -13506,7 +13509,7 @@ dwarf2out_init (const char *filename ATT
 
   incomplete_types = VEC_alloc (tree, gc, 64);
 
-  VARRAY_RTX_INIT (used_rtx_varray, 32, "used_rtx_varray");
+  used_rtx_array = VEC_alloc (rtx, gc, 32);
 
   ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label,


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