Re: [PATCH] Reduce memory usage for storing LTO decl resolutions

2012-09-05 Thread Diego Novillo
On 2012-09-04 18:49 , Steven Bosscher wrote: Did you mean to use DEF_VEC_O here? (Not sure it matters after the vec rewrite for c++) It doesn't anymore. But it will matter for backports. Diego.

Re: [PATCH] Reduce memory usage for storing LTO decl resolutions

2012-09-05 Thread Richard Guenther
On Wed, Sep 5, 2012 at 12:49 AM, Steven Bosscher wrote: > On Tue, Sep 4, 2012 at 6:43 PM, Andi Kleen wrote: >> +/* Compact representation of a index <-> resolution pair. Unpacked to an >> + vector later. */ >> +struct res_pair >> +{ >> + ld_plugin_symbol_resolution_t res; >> + unsigned index;

Re: [PATCH] Reduce memory usage for storing LTO decl resolutions

2012-09-04 Thread Steven Bosscher
On Tue, Sep 4, 2012 at 6:43 PM, Andi Kleen wrote: > +/* Compact representation of a index <-> resolution pair. Unpacked to an > + vector later. */ > +struct res_pair > +{ > + ld_plugin_symbol_resolution_t res; > + unsigned index; > +}; > +typedef struct res_pair res_pair; > + > +DEF_VEC_P(res_

[PATCH] Reduce memory usage for storing LTO decl resolutions

2012-09-04 Thread Andi Kleen
From: Andi Kleen With a LTO build of a large project (>11k subfiles incrementially linked) storing the LTO resolutions took over 0.5GB memory: lto/lto.c:1087 (lto_resolution_read) 0: 0.0% 540398500 15903: 0.0% The reason is that the declaration indexes are quite