diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-20 11:45:26 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-20 11:45:26 +0000 |
commit | 2bc9fc534419994243e17f21b906cad1795461e1 (patch) | |
tree | 9c02ce26170091fbc2cb20b4806f8a3edce09bd1 /gcc/reload1.c | |
parent | cc69bcd02109a1bd756944f5c7a9b36f37d6672c (diff) | |
download | gcc-2bc9fc534419994243e17f21b906cad1795461e1.tar.gz |
* Makefile.in (GTFILES): Add $(srcdir)/reload.h.
* gengtype.c (open_base_files): Include reload.h in ifiles.
* reload.h (reg_equiv_memory_loc_varray): Declare.
* reload1.c (reg_equiv_memory_loc_varray): New variable.
(init_reload): Initialize it.
(reload): Instead of freeing reg_equiv_memory_loc, 'grow'
reg_equiv_memory_loc_varray to size 0.
* ra.c (reg_alloc): Allocate reg_equiv_memory_loc by
growing reg_equiv_memory_loc_varray to the desired size.
* passes.c (rest_of_handle_old_regalloc): Likewise.
* reload.c: Amend comment on calling init_reload.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82050 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index c848ce67101..428228052dd 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -102,6 +102,10 @@ rtx *reg_equiv_constant; is transferred to either reg_equiv_address or reg_equiv_mem. */ 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; + /* 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 (because its displacement is too big for the machine.) */ @@ -482,6 +486,7 @@ 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. */ @@ -1236,8 +1241,7 @@ reload (rtx first, int global) if (reg_equiv_constant) free (reg_equiv_constant); reg_equiv_constant = 0; - if (reg_equiv_memory_loc) - free (reg_equiv_memory_loc); + VARRAY_GROW (reg_equiv_memory_loc_varray, 0); reg_equiv_memory_loc = 0; if (offsets_known_at) |