local-alloc.c (rest_of_handle_local_alloc): Use VEC instead of VARRAY.
authorKazu Hirata <kazu@codesourcery.com>
Fri, 14 Apr 2006 14:31:32 +0000 (14:31 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 14 Apr 2006 14:31:32 +0000 (14:31 +0000)
* local-alloc.c (rest_of_handle_local_alloc): Use VEC instead
of VARRAY.
* reload1.c (reg_equiv_memory_loc_varray): Rename to
reg_equiv_memory_loc_vec.  Change the type to VEC(rtx,gc) *.
(init_reload, reload): Use VEC instead of VARRAY.
* reload.h: Update the prototype for
reg_equiv_memory_loc_varray.

From-SVN: r112955

gcc/ChangeLog
gcc/local-alloc.c
gcc/reload.h
gcc/reload1.c

index d063df8311e5c172b601f1f2e9cf879831abc71c..c9cfac42f7a1fb3649239a4d3a2c8b923862d66a 100644 (file)
@@ -1,3 +1,13 @@
+2006-04-14  Kazu Hirata  <kazu@codesourcery.com>
+
+       * local-alloc.c (rest_of_handle_local_alloc): Use VEC instead
+       of VARRAY.
+       * reload1.c (reg_equiv_memory_loc_varray): Rename to
+       reg_equiv_memory_loc_vec.  Change the type to VEC(rtx,gc) *.
+       (init_reload, reload): Use VEC instead of VARRAY.
+       * reload.h: Update the prototype for
+       reg_equiv_memory_loc_varray.
+
 2006-04-14  Alexey Starovoytov  <alexey.starovoytov@sun.com>
             Eric Botcazou  <ebotcazou@libertysurf.fr>
 
index f751c0fc31f3d21cfb3be237bd46b21ddfcfe37b..c103400b8eaf9093b6aadf9d0ece4488edf2108f 100644 (file)
@@ -2537,8 +2537,10 @@ rest_of_handle_local_alloc (void)
   allocate_reg_info (max_regno, FALSE, TRUE);
 
   /* And the reg_equiv_memory_loc array.  */
-  VARRAY_GROW (reg_equiv_memory_loc_varray, max_regno);
-  reg_equiv_memory_loc = &VARRAY_RTX (reg_equiv_memory_loc_varray, 0);
+  VEC_safe_grow (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
+  memset (VEC_address (rtx, reg_equiv_memory_loc_vec), 0,
+         sizeof (rtx) * max_regno);
+  reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
 
   allocate_initial_values (reg_equiv_memory_loc);
 
index a63010c630aa928cf22e4effdf164e51dfded1b2..fbb315ef0feb4f7844b63585e5ee6b28df879853 100644 (file)
@@ -155,7 +155,7 @@ extern struct reload rld[MAX_RELOADS];
 extern int n_reloads;
 #endif
 
-extern GTY (()) struct varray_head_tag *reg_equiv_memory_loc_varray;
+extern GTY (()) VEC(rtx,gc) *reg_equiv_memory_loc_vec;
 extern rtx *reg_equiv_constant;
 extern rtx *reg_equiv_invariant;
 extern rtx *reg_equiv_memory_loc;
index b9d7f8ed4aee2fe27f28001e409e28216c68c6a6..d791da6ff32e21f887501a504c8f2fc4105ef5e7 100644 (file)
@@ -112,7 +112,7 @@ rtx *reg_equiv_memory_loc;
 
 /* We allocate reg_equiv_memory_loc inside a varray so that the garbage
    collector can keep track of what is inside.  */
-varray_type reg_equiv_memory_loc_varray;
+VEC(rtx,gc) *reg_equiv_memory_loc_vec;
 
 /* Element N is the address of stack slot to which pseudo reg N is equivalent.
    This is used when the address is not valid as a memory address
@@ -496,7 +496,6 @@ init_reload (void)
 
   INIT_REG_SET (&spilled_pseudos);
   INIT_REG_SET (&pseudos_counted);
-  VARRAY_RTX_INIT (reg_equiv_memory_loc_varray, 0, "reg_equiv_memory_loc");
 }
 
 /* List of insn chains that are currently unused.  */
@@ -1251,7 +1250,7 @@ reload (rtx first, int global)
     free (reg_equiv_invariant);
   reg_equiv_constant = 0;
   reg_equiv_invariant = 0;
-  VARRAY_GROW (reg_equiv_memory_loc_varray, 0);
+  VEC_free (rtx, gc, reg_equiv_memory_loc_vec);
   reg_equiv_memory_loc = 0;
 
   if (offsets_known_at)