This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: More DOM memory reductions
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jeffrey A Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Sep 2004 16:31:46 +0200
- Subject: Re: More DOM memory reductions
- References: <1095736674.10950.318.camel@localhost.localdomain>
> And the never ending task continues.
>
> This patch moves equivalences from a pass-local varray table in DOM
> to a first class field within the SSA_NAME structure.
>
> While this does slightly grow the SSA_NAME structure, that growth
> is recovered many times over by the elimination of the global
> const_and_copies varray in DOM.
>
> The global const_and_copies varray is _at a minimum_ allocated 3N
> times where N is the number of functions we optimize -- often it is
> significantly higher due to the iteration step in DOM which often
> leads to growing the old const_and_copies varray.
>
> To give you a sense of how much memory we're talking about; this
> change reduces the amount of GC'd memory allocated by nearly 8M
> in Gerald's testcase. Yup. 8M.
>
> In addition, this change more aggressively zero's out SSA_NAMEs which
> are put on the free list. That change doesn't help Gerald's testcase
> but according to Jan, it does help other testcases significantly.
>
> Bootstrapped and regression tested on i686-pc-linux-gnu.
Just for a record, gcctest reported following savings on Gerald's
testcase:
Amount of produced GGC garbage decreased from 730435k to 696554k, overall -4.86%
If I am counting right, this is not 8MB, it is 33MB and is ineed huge
improvement. Might be combined effect with the c++ patch, but similar
saving happens for insn-attrtab compilation too:
Amount of produced GGC garbage decreased from 543545k to 522970k, overall -3.93%
I wonder what procedure do you use for testing the memory consumption,
so our results are not quite in sync. (the gcctest procedure is
described at the end of mail. Basically it is looking for the
-fmem-report output produced by --enable-gather-mem-stats compiler.
I am also very surprised by zero effect of this patch on combine.c
memory usage....
Honza