This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A recent patch increased GCC's memory consumption in some cases!
- From: Richard Guenther <rguenther at suse dot de>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, GCC Development <gcc at gcc dot gnu dot org>, gcctest at suse dot de, dvorakz at suse dot cz, andrew_pinski at playstation dot sony dot com, gcc-regression at gcc dot gnu dot org
- Date: Mon, 23 Apr 2007 10:28:38 +0200 (CEST)
- Subject: Re: A recent patch increased GCC's memory consumption in some cases!
- References: <462B685C.mail2PF14OOH0@suse.de> <20070422201222.GF23507@kam.mff.cuni.cz> <de8d50360704221539m2c6b7f1t5959cecad89558bb@mail.gmail.com> <de8d50360704221843n7690973bua62aff47ad6a476b@mail.gmail.com>
On Sun, 22 Apr 2007, Andrew Pinski wrote:
> On 4/22/07, Andrew Pinski <pinskia@gmail.com> wrote:
> > I think it was just by accident that the libfuncs would fit in
> > phi_node+3 operand slot. Also I think extra_order_size_table needs to
> > be relooked at after my phi_node and the gimple_stmt patches as I
> > think we now put have some duplicates and the sizes have slightly
> > changed.
>
> Ok, it was just happened on x86 to be sizeof(struct
> tree_function_decl) == sizeof (struct tree_phi_node) + sizeof (struct
> phi_arg_d) * 3 which is no longer true any more. Now we are wasting
> 32bytes on x86 per function decl. This was never true on any other
> target anyways as sizeof(struct tree_function_decl) was always bigger.
>
> So the only thing to do is to add sizeof(struct tree_function_decl) to
> extra_order_size_table or change how we deal with small allocations.
This is what I suspected. I suppose I can do another round of tuning
here at the end of stage2 - and maybe before push a slight interface
change to request alignment on memory allocation, this would allow for
even more compaction (remember that failed because we cannot validly
compute alignment requirements out of object size).
Richard.