[Bug c/12245] [4.2/4.3/4.4 regression] Uses lots of memory when compiling large initialized arrays
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Sat Feb 21 12:50:00 GMT 2009
------- Comment #41 from rguenther at suse dot de 2009-02-21 12:50 -------
Subject: Re: [4.2/4.3/4.4 regression] Uses lots of memory when
compiling large initialized arrays
On Sat, 21 Feb 2009, hubicka at gcc dot gnu dot org wrote:
> ------- Comment #40 from hubicka at gcc dot gnu dot org 2009-02-21 12:40 -------
> I happen to have compiler with statistics around:
> We still need about 400MB, mostly integer constants:
> c-decl.c:473 (bind) 125040: 0.0% 0:
> 0.0% 0: 0.0% 0: 0.0% 2605
> tree.c:5905 (build_function_type) 13000: 0.0% 0:
> 0.0% 113400: 0.1% 5056: 0.0% 632
> stringpool.c:73 (alloc_node) 6032: 0.0% 0:
> 0.0% 174096: 0.1% 13856: 0.0% 1732
> langhooks.c:543 (add_builtin_function_common) 0: 0.0% 0:
> 0.0% 442224: 0.2% 59760: 0.2% 1494
> c-typeck.c:6472 (output_init_element) 0: 0.0%
> 47910400:100.0% 45541112:23.7% 26342936:66.6% 19
> convert.c:752 (convert_to_integer) 117415728:44.6% 0:
> 0.0% 0: 0.0% 13046192:33.0% 1630774
> ggc-common.c:187 (ggc_calloc) 67094608:25.5% 0:
> 0.0% 67162736:34.9% 1088: 0.0% 58
> tree.c:1004 (build_int_cst_wide) 78264768:29.8% 0:
> 0.0% 78266496:40.7% 0: 0.0% 3261068
> Total 262986355 47910416
> 192171521 39527780 4905807
> source location Garbage Freed
> Leak Overhead Times
>
>
> It seems that we produce awful amount of garbage during the initializer
> construction. Perhaps by forcing ggc_collect there we can get down to 200MB
> that we need to reprezent it at the end?
We need the integer csts in the constructor lists. I have a patch
somewhere (or is it even attached?) that tries to do index compression
and not use the integer csts for counting. Didn't work out too much
though.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12245
More information about the Gcc-bugs
mailing list