public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3)
@ 2003-10-06 15:12 gerald at pfeifer dot com
  2003-10-06 15:19 ` [Bug middle-end/12524] [tree-ssa] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: gerald at pfeifer dot com @ 2003-10-06 15:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524

           Summary: Slow-down and memory consumption increased 6x (C++ code,
                    -O3)
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gerald at pfeifer dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-unknown-freebsd4.8

For the C++ code from PR8361 and -O3, the tree-ssa branch consumes 118s and 600+MB
whereas GCC 3.2.3 only consumes 72s 110MB.

This is most critical and needs to be addressed before merging tree-ssa to
mainline (as, in fact, already GCC 3.2.3 is much to slow; see PR8361 for details).


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
@ 2003-10-06 15:19 ` pinskia at gcc dot gnu dot org
  2003-10-06 15:27 ` amacleod at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-06 15:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog, memory-hog
            Summary|Slow-down and memory        |[tree-ssa] Slow-down and
                   |consumption increased 6x    |memory consumption increased
                   |(C++ code, -O3)             |6x (C++ code, -O3)
   Target Milestone|---                         |tree-ssa


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
  2003-10-06 15:19 ` [Bug middle-end/12524] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2003-10-06 15:27 ` amacleod at redhat dot com
  2003-10-06 20:34 ` amacleod at redhat dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2003-10-06 15:27 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524



------- Additional Comments From amacleod at redhat dot com  2003-10-06 15:27 -------
What does mainline consume on this? (Since tree-ssa mirrors mainline, it should
be compared to that for merging criteria)


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
  2003-10-06 15:19 ` [Bug middle-end/12524] [tree-ssa] " pinskia at gcc dot gnu dot org
  2003-10-06 15:27 ` amacleod at redhat dot com
@ 2003-10-06 20:34 ` amacleod at redhat dot com
  2003-10-07 20:05 ` amacleod at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2003-10-06 20:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524



------- Additional Comments From amacleod at redhat dot com  2003-10-06 20:34 -------
The changes I checked into the tree-ssa branch today to improve compile time of
CCP appears to have some effect on this. There are secondary effects which I
guess someone should sort out :-)

Anyway, on my machine, user time for this file is actually a few seconds faster
for tree-ssa (62 seconds mainline, 59 seconds tree-ssa), but wall time in the
parser blows up, resulting in a slower real time:
mainline:
parser                :   7.96 (13%) usr   0.98 (28%) sys  18.18 (23%) wall
tree-ssa:
parser                :   8.31 (14%) usr   1.22 (25%) sys  42.95 (36%) wall

Andrew


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
                   ` (2 preceding siblings ...)
  2003-10-06 20:34 ` amacleod at redhat dot com
@ 2003-10-07 20:05 ` amacleod at redhat dot com
  2003-10-26 18:44 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2003-10-07 20:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524



------- Additional Comments From amacleod at redhat dot com  2003-10-07 20:05 -------
Some further investigation appears to point the finger at gimplification. I've
run this while watching memory use in a monitor.. mainline slowly builds and
peaks at about 170MB or so. tree-ssa climbs quicker, and peaks around 450MB, and
spends most of the time hovering around 400MB. If I disable SSA completely, that
only drops to about 400MB for a peak, so we dont see a lot of change (now that
SSA is using less memory in CCP :-)

So the question is, why are we using so much more memory.. is it because
gimplification is producing so many more instructions and temporaries? is there
a fix for this?  Perhaps Jaosn is the best one to take a look at this since he's
the one intimately familiar with the gimplification process.


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
                   ` (3 preceding siblings ...)
  2003-10-07 20:05 ` amacleod at redhat dot com
@ 2003-10-26 18:44 ` steven at gcc dot gnu dot org
  2003-10-26 20:24   ` Daniel Berlin
  2003-11-17 19:34 ` dberlin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-10-26 18:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524


steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Priority|P2                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-26 18:01:56
               date|                            |


------- Additional Comments From steven at gcc dot gnu dot org  2003-10-26 18:01 -------
> Perhaps [Jason] is the best one to take a look at this since he's
> the one intimately familiar with the gimplification process.

Let's add him to the CC: list then so he doesn't forget :-)

Oh, and of course this bug should be in NEW state, it's been confirmed many
times, for many targets.  This is a very serious problem for many people, and
certainly an unacceptable regression.  You all have machines that are just too
big.  I can't even compile the test case for PR 8361, with 256MB of RAM.  It
starts swapping so bad, especially with PRE enabled (because of its extra
ggc_collect calls, probably).


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

* Re: [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-26 18:44 ` steven at gcc dot gnu dot org
@ 2003-10-26 20:24   ` Daniel Berlin
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Berlin @ 2003-10-26 20:24 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

>> Perhaps [Jason] is the best one to take a look at this since he's
>> the one intimately familiar with the gimplification process.
>
> Let's add him to the CC: list then so he doesn't forget :-)
>
> Oh, and of course this bug should be in NEW state, it's been confirmed 
> many
> times, for many targets.  This is a very serious problem for many 
> people, and
> certainly an unacceptable regression.  You all have machines that are 
> just too
> big.  I can't even compile the test case for PR 8361, with 256MB of 
> RAM.  It
> starts swapping so bad, especially with PRE enabled (because of its 
> extra
> ggc_collect calls, probably).

PRE now keeps stats on it's memory consumption during PRE of each 
expression.
Can you please compile the testcase  with -fdump-tree-pre-stats and 
tell me if you see any absurdly large numbers (The allocated numbers 
are in bytes, the expressions generated is just a count. I've never 
seen it higher than ~40, but conceivably even 1000 shouldn't take that 
much memory, if it is, something is wrong in the size of the 
annotations or something).

If you don't see absurdly large numbers, then this is the fault of the 
GC (in not being able to free memory it should), not PRE, and there's 
nothing i can do about it.
If you do see absurdly large numbers, please, let me know, and i'll 
attempt to do what i can.



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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
                   ` (4 preceding siblings ...)
  2003-10-26 18:44 ` steven at gcc dot gnu dot org
@ 2003-11-17 19:34 ` dberlin at gcc dot gnu dot org
  2004-01-12  9:43 ` steven at gcc dot gnu dot org
  2004-01-13 19:59 ` gerald at pfeifer dot com
  7 siblings, 0 replies; 10+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2003-11-17 19:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2003-11-17 19:34 -------
At least on my machine:
for -O2, it hits a high mark of 251 meg, and generally stays around 150 meg.
for -O3, it hits a high mark of well over 750 meg.
The parser time blowup still applies.

Either we've got a memory leak somewhere at -O3 that this tickles, or we are
doing a seriously horrible job of actually releasing pages.

I say this because even as the memory is still increasing at 10 or 15 meg a
second, the GC thinks we have no more than 100 meg GC allocated, and it's not
increasing anywhere near that fast:
IE
{GC 100425k -> 76048k}  (we have 650 meg really allocated)
...
{GC 103093k -> 77614k}  (we have 750 meg really allocated)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
                   ` (5 preceding siblings ...)
  2003-11-17 19:34 ` dberlin at gcc dot gnu dot org
@ 2004-01-12  9:43 ` steven at gcc dot gnu dot org
  2004-01-13 19:59 ` gerald at pfeifer dot com
  7 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-12  9:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2004-01-12 09:43 -------
Gerald, based on http://gcc.gnu.org/ml/gcc/2004-01/msg00657.html I would like 
to close this.  We have many other PRs to track compile time and memory abuse, 
but that doesn't seem to be a tree-ssa problem per-se anymore.  Agree? 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524


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

* [Bug middle-end/12524] [tree-ssa] Slow-down and memory consumption increased 6x (C++ code, -O3)
  2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
                   ` (6 preceding siblings ...)
  2004-01-12  9:43 ` steven at gcc dot gnu dot org
@ 2004-01-13 19:59 ` gerald at pfeifer dot com
  7 siblings, 0 replies; 10+ messages in thread
From: gerald at pfeifer dot com @ 2004-01-13 19:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gerald at pfeifer dot com  2004-01-13 19:59 -------
More or less solved, that is, tree-ssa is not worse than mainline any longer
(though mainline itself certainly should be improved, which Jan is working on).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12524


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

end of thread, other threads:[~2004-01-13 19:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-06 15:12 [Bug middle-end/12524] New: Slow-down and memory consumption increased 6x (C++ code, -O3) gerald at pfeifer dot com
2003-10-06 15:19 ` [Bug middle-end/12524] [tree-ssa] " pinskia at gcc dot gnu dot org
2003-10-06 15:27 ` amacleod at redhat dot com
2003-10-06 20:34 ` amacleod at redhat dot com
2003-10-07 20:05 ` amacleod at redhat dot com
2003-10-26 18:44 ` steven at gcc dot gnu dot org
2003-10-26 20:24   ` Daniel Berlin
2003-11-17 19:34 ` dberlin at gcc dot gnu dot org
2004-01-12  9:43 ` steven at gcc dot gnu dot org
2004-01-13 19:59 ` gerald at pfeifer dot com

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).