This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Trim down memory usage in alias.c
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 20 Jan 2004 13:48:35 -0800
- Subject: Re: Trim down memory usage in alias.c
- References: <20040120203921.GT7878@kam.mff.cuni.cz>
Jan Hubicka <jh@suse.cz> writes:
> Hi,
> this trick reduces amount of memory allocated by that ggc_alloc call
> from 31MB to 800Kb for Gerald's testcase and 256MB system.
>
> Fulltesting is still in progress (I've killed it by accident), OK if it
> passes?
Yes, assuming you are testing with
--enable-checking=tree,misc,gc,gcac, except that:
+ old_reg_base_value = reg_base_value;
+ old_reg_base_value_size = reg_base_value_size;
It is better to do this only if
! reg_base_value || reg_base_value_size > old_reg_base_value_size
for instance, if a large routine is compiled, followed by a small
routine, followed by another large routine, we want to keep re-using
the same array.
--
- Geoffrey Keating <geoffk@geoffk.org>