diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2006-04-14 14:31:32 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2006-04-14 14:31:32 +0000 |
commit | 43b373a2a5115268b5320b24f770a02b60353557 (patch) | |
tree | 9b7e85735089c4ca6a211da08638cf2f0a7f0793 | |
parent | 68ba34f361d5287404bde9283b9df315f4a2c147 (diff) | |
download | gcc-43b373a2a5115268b5320b24f770a02b60353557.zip gcc-43b373a2a5115268b5320b24f770a02b60353557.tar.gz gcc-43b373a2a5115268b5320b24f770a02b60353557.tar.bz2 |
local-alloc.c (rest_of_handle_local_alloc): Use VEC instead of VARRAY.
* 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
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/local-alloc.c | 6 | ||||
-rw-r--r-- | gcc/reload.h | 2 | ||||
-rw-r--r-- | gcc/reload1.c | 5 |
4 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d063df8..c9cfac4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index f751c0f..c103400 100644 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -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); diff --git a/gcc/reload.h b/gcc/reload.h index a63010c..fbb315e 100644 --- a/gcc/reload.h +++ b/gcc/reload.h @@ -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; diff --git a/gcc/reload1.c b/gcc/reload1.c index b9d7f8e..d791da6 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -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) |