public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* SSA annotations memory use.
@ 2004-12-07 14:14 Jan Hubicka
  2004-12-07 14:39 ` Andrew MacLeod
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Hubicka @ 2004-12-07 14:14 UTC (permalink / raw)
  To: dnovillo, stevenb, gcc

Hi,
I've been looking into memory usage of tree-profiling branch and after
parsing combine.c roughly 25% is consumed by CFG related datastructurs.
3% are adges, 2.7% tsi linked lists, 6.6% blocks, 7% labels, 13%
statement annotations.

Overall the scenario is not _that_ bad as we cleanup code early so
memory peak is actually 20% smaller for Gerald's testcase and 12% bigger
for GCC binarry compared to mainline, but still this looks like quite
bloated stuff.

I think I can get the CFG usage down by splitting up the info used by
RTL only to be allocated on local basis and prune out some unneded stuff
from edges and blocks, but the major part are the labels and
annotations.  Are there any current plans on getting these smaller?
(one obvious idea is to kill the annotations once function is analyzed
and recompute them when it is being compiled, but this is side step from
plan to build and preserve SSA), but perhaps we can think of breaking it
up to part that survive from analysis to compilatio and part that will
get recomputed cheaply?

Honza

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SSA annotations memory use.
  2004-12-07 14:14 SSA annotations memory use Jan Hubicka
@ 2004-12-07 14:39 ` Andrew MacLeod
  2004-12-07 14:54   ` Jan Hubicka
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew MacLeod @ 2004-12-07 14:39 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Diego Novillo, stevenb, gcc mailing list

On Tue, 2004-12-07 at 09:14, Jan Hubicka wrote:
> Hi,
> I've been looking into memory usage of tree-profiling branch and after
> parsing combine.c roughly 25% is consumed by CFG related datastructurs.
> 3% are adges, 2.7% tsi linked lists, 6.6% blocks, 7% labels, 13%
> statement annotations.

> 
> I think I can get the CFG usage down by splitting up the info used by
> RTL only to be allocated on local basis and prune out some unneded stuff
> from edges and blocks, but the major part are the labels and
> annotations.  Are there any current plans on getting these smaller?
> (one obvious idea is to kill the annotations once function is analyzed
> and recompute them when it is being compiled, but this is side step from
> plan to build and preserve SSA), but perhaps we can think of breaking it
> up to part that survive from analysis to compilatio and part that will
> get recomputed cheaply?

you could try getting rid of all the stmt operand caches until you need
them again. They could be a good percentage chunk of the annotation, and
they are just going to get larger in 4.1 when the immediate use info is
integrated. 

when you analyze the function, how far into the compilation process do
you go?

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SSA annotations memory use.
  2004-12-07 14:39 ` Andrew MacLeod
@ 2004-12-07 14:54   ` Jan Hubicka
  2004-12-07 15:41     ` Andrew MacLeod
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Hubicka @ 2004-12-07 14:54 UTC (permalink / raw)
  To: Andrew MacLeod; +Cc: Jan Hubicka, Diego Novillo, stevenb, gcc mailing list

> On Tue, 2004-12-07 at 09:14, Jan Hubicka wrote:
> > Hi,
> > I've been looking into memory usage of tree-profiling branch and after
> > parsing combine.c roughly 25% is consumed by CFG related datastructurs.
> > 3% are adges, 2.7% tsi linked lists, 6.6% blocks, 7% labels, 13%
> > statement annotations.
> 
> > 
> > I think I can get the CFG usage down by splitting up the info used by
> > RTL only to be allocated on local basis and prune out some unneded stuff
> > from edges and blocks, but the major part are the labels and
> > annotations.  Are there any current plans on getting these smaller?
> > (one obvious idea is to kill the annotations once function is analyzed
> > and recompute them when it is being compiled, but this is side step from
> > plan to build and preserve SSA), but perhaps we can think of breaking it
> > up to part that survive from analysis to compilatio and part that will
> > get recomputed cheaply?
> 
> you could try getting rid of all the stmt operand caches until you need
> them again. They could be a good percentage chunk of the annotation, and
> they are just going to get larger in 4.1 when the immediate use info is
> integrated. 
> 
> when you analyze the function, how far into the compilation process do
> you go?
Not far at the moment - only cleanup the cfg and instrument for
profilng.  Of course the plan is to optimize harder at this stage.
Also I would expect that the caches would show up as different field in
-fmem-report dump...

Honza
> 
> Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SSA annotations memory use.
  2004-12-07 14:54   ` Jan Hubicka
@ 2004-12-07 15:41     ` Andrew MacLeod
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew MacLeod @ 2004-12-07 15:41 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Jan Hubicka, Diego Novillo, stevenb, gcc mailing list

On Tue, 2004-12-07 at 09:53, Jan Hubicka wrote:
> > On Tue, 2004-12-07 at 09:14, Jan Hubicka wrote:

> > when you analyze the function, how far into the compilation process do
> > you go?
> Not far at the moment - only cleanup the cfg and instrument for
> profilng.  Of course the plan is to optimize harder at this stage.
> Also I would expect that the caches would show up as different field in
> -fmem-report dump...

they wouldn't exist until you go into ssa anyway. They are hung off of
the stmt annotation.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-12-07 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-07 14:14 SSA annotations memory use Jan Hubicka
2004-12-07 14:39 ` Andrew MacLeod
2004-12-07 14:54   ` Jan Hubicka
2004-12-07 15:41     ` Andrew MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).