A recent patch increased GCC's memory consumption in some cases!

Richard Guenther rguenther@suse.de
Mon Apr 23 08:29:00 GMT 2007


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.



More information about the Gcc-regression mailing list