Bug 27004 - [4.3 Regression] Insane amount of memory needed at -O1 and above because of salias and large switch
Summary: [4.3 Regression] Insane amount of memory needed at -O1 and above because of s...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: alias, memory-hog
Depends on: 26854 26830
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-03 13:43 UTC by Paolo Bonzini
Modified: 2010-04-20 13:22 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.4.0
Known to fail: 4.3.4
Last reconfirmed: 2007-11-04 12:47:36


Attachments
patch (1.71 KB, text/plain)
2007-11-04 13:38 UTC, Richard Biener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2006-04-03 13:43:29 UTC
spinning a separate bug from PR26830.  we are creating a lot of field memory tags, each of which is present in a 900-argument phi, which causes us to use more memory than 4.0.

to some extent this is unavoidable, but I wonder if we could throttle things down a bit?
Comment 1 Daniel Berlin 2006-04-03 14:37:52 UTC
Subject: Re:   New: [4.1/4.2 Regression]
	Insane amount of memory needed at -O1 and above because of salias

On Mon, 2006-04-03 at 13:43 +0000, bonzini at gnu dot org wrote:
> spinning a separate bug from PR26830.  we are creating a lot of field memory
> tags, each of which is present in a 900-argument phi, which causes us to use
> more memory than 4.0.
> 
> to some extent this is unavoidable, but I wonder if we could throttle things
> down a bit?
> 

Err, why do we have a 900 argument phi?
Seems a bit large.


Comment 2 rguenther@suse.de 2006-04-03 14:39:20 UTC
Subject: Re:  [4.1/4.2 Regression] Insane amount
 of memory needed at -O1 and above because of salias

On Mon, 3 Apr 2006, dberlin at dberlin dot org wrote:

> On Mon, 2006-04-03 at 13:43 +0000, bonzini at gnu dot org wrote:
> > spinning a separate bug from PR26830.  we are creating a lot of field memory
> > tags, each of which is present in a 900-argument phi, which causes us to use
> > more memory than 4.0.
> > 
> > to some extent this is unavoidable, but I wonder if we could throttle things
> > down a bit?
> > 
> 
> Err, why do we have a 900 argument phi?
> Seems a bit large.

Because the testcase is - err - interesting.

Richard.
Comment 3 Mark Mitchell 2006-05-25 02:34:25 UTC
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
Comment 4 Richard Biener 2007-11-04 12:47:36 UTC
If you solve the SFT problem, DF needs lot of memory and compile-time in this
testcase on the trunk.  The execute() function has lots of basic blocks with
a high number of incoming edges.

So, I have a patch for the SFT problem.
Comment 5 Richard Biener 2007-11-04 13:34:06 UTC
Some numbers (-O):

4.0.4 needs 596MB peak
4.1.2 needs 2GB peak (and a lot of time)
4.2.2 same as 4.1.2
4.3.0 same as 4.2.2
Comment 6 Richard Biener 2007-11-04 13:38:40 UTC
Created attachment 14483 [details]
patch

Patch to limit the number of SFTs created per function.  The limit of 1000 SFTs
brings down memory usage to 1.3GB, a limit of 500 to 1.2GB, a limit of 100 results in 970MB, a limit of
zero 954MB.

So there's still something taking 400MB more memory than in 4.0.
Comment 7 Joseph S. Myers 2008-07-04 20:23:43 UTC
Closing 4.1 branch.
Comment 8 Jakub Jelinek 2008-12-08 14:41:48 UTC
It is unclear which target this was tested on, in any case current trunk tops on this at around 1.2GB.
Comment 9 Richard Biener 2008-12-08 14:47:42 UTC
I think this is a dup of PR26854 on the trunk at least - the excess memory used
is used by DF (SFTs are gone on the trunk).

So, this is now a 4.2/4.3 regression only (which still have SFTs).
Comment 10 Joseph S. Myers 2009-03-31 19:33:08 UTC
Closing 4.2 branch.
Comment 11 Richard Biener 2009-08-04 12:27:42 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 12 Richard Biener 2010-04-20 13:22:49 UTC
WONTFIX on the branch.