This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trim down memory usage in alias.c


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]