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
> On Tue, Jan 20, 2004 at 09:39:21PM +0100, Jan Hubicka wrote:
> > + static unsigned int old_reg_base_value_size;
> [...]
> > ! reg_base_value_size = old_reg_base_value_size;
> > ! if (reg_base_value_size > maxreg * 2)
> > ! reg_base_value_size = maxreg * 2;
> [...]
> > + old_reg_base_value_size = reg_base_value_size;
>
> Better than this, which crops the known size of the old array,
> would be to use ggc_get_size when looking to reuse the old array.
Actually I found that this patch may affect code, as we allow new
register allocated and record them only if regno < reg_base_value_size
(we don't resize the array).
I think that in this case we really want varray and I am testing patch
that saves extra few bytes and fix this
(as well as size down some other arrays and loop that unneceairly walk
the inexisting registers)
So I will send updated patch shortly.
Honza