* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
@ 2008-01-21 8:45 ` oliver dot kellogg at eads dot com
2008-05-22 11:24 ` oliver dot kellogg at eads dot com
` (15 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-01-21 8:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from oliver dot kellogg at eads dot com 2008-01-21 07:30 -------
Created an attachment (id=14985)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14985&action=view)
source code for producing the bug
I tried this with gcc-4.1, 4.2, and 4.3.
If I remove the aggregate assignments such as
Fumessage.O000X := (Pkg000W.E08EY, Aktergsatz);
from pkg001u.adb then compilation proceeds at normal memory consumption.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
2008-01-21 8:45 ` [Bug ada/34898] " oliver dot kellogg at eads dot com
@ 2008-05-22 11:24 ` oliver dot kellogg at eads dot com
2008-05-25 10:39 ` oliver dot kellogg at eads dot com
` (14 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-22 11:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from oliver dot kellogg at eads dot com 2008-05-22 11:23 -------
Still happens with 4.4.0 20080522.
Please advise if there is any further info that I could provide
to help track the problem down.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
2008-01-21 8:45 ` [Bug ada/34898] " oliver dot kellogg at eads dot com
2008-05-22 11:24 ` oliver dot kellogg at eads dot com
@ 2008-05-25 10:39 ` oliver dot kellogg at eads dot com
2008-05-25 12:04 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 10:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from oliver dot kellogg at eads dot com 2008-05-25 10:38 -------
Does not happen with -gnatc (syntax and semantics check only.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (2 preceding siblings ...)
2008-05-25 10:39 ` oliver dot kellogg at eads dot com
@ 2008-05-25 12:04 ` rguenth at gcc dot gnu dot org
2008-05-25 13:32 ` oliver dot kellogg at eads dot com
` (12 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-25 12:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-05-25 12:03 -------
Does enabling optimization (-O) fix the problem? My guess is that the
gimplification of the aggregate assignments creates lots of overhead, but that
needs to be investigated by Ada people - stats with a compiler configured with
--enable-gather-detailed-mem-stats would also be useful.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (3 preceding siblings ...)
2008-05-25 12:04 ` rguenth at gcc dot gnu dot org
@ 2008-05-25 13:32 ` oliver dot kellogg at eads dot com
2008-05-25 13:39 ` oliver dot kellogg at eads dot com
` (11 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 13:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from oliver dot kellogg at eads dot com 2008-05-25 13:31 -------
Created an attachment (id=15679)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15679&action=view)
statistics output from gnat1 on pkg001u.adb without aggregate assignments
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (4 preceding siblings ...)
2008-05-25 13:32 ` oliver dot kellogg at eads dot com
@ 2008-05-25 13:39 ` oliver dot kellogg at eads dot com
2008-05-25 13:48 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 13:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from oliver dot kellogg at eads dot com 2008-05-25 13:38 -------
Created an attachment (id=15680)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15680&action=view)
statistics output from gnat1 on pkg001u.adb with one assignment
Here, I enabled the assignment in line 377,
Tramessage.O000X := (Pkg000W.E08EY, Aktergsatz);
and invoked gnat1 directly as follows:
/opt/gccsnap/libexec/gcc/i686-pc-linux-gnu/4.4.0/gnat1 -gnat95 -mtune=generic \
pkg001u.adb
(Notice the increase in 'expand'. Is that within expected limits?)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (5 preceding siblings ...)
2008-05-25 13:39 ` oliver dot kellogg at eads dot com
@ 2008-05-25 13:48 ` rguenth at gcc dot gnu dot org
2008-05-25 15:42 ` oliver dot kellogg at eads dot com
` (9 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-25 13:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-05-25 13:48 -------
Well, this assignment seems to be _very_ expensive both in terms of parsing
time
and size of the IL to expand. It certainly looks unreasonable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (6 preceding siblings ...)
2008-05-25 13:48 ` rguenth at gcc dot gnu dot org
@ 2008-05-25 15:42 ` oliver dot kellogg at eads dot com
2008-05-25 18:13 ` oliver dot kellogg at eads dot com
` (8 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from oliver dot kellogg at eads dot com 2008-05-25 15:42 -------
(in reply to comment #4)
> Does enabling optimization (-O) fix the problem?
No, does not change the behavior (other than taking even longer)
> [...] stats with a compiler configured with
> --enable-gather-detailed-mem-stats would also be useful.
Coming up.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (7 preceding siblings ...)
2008-05-25 15:42 ` oliver dot kellogg at eads dot com
@ 2008-05-25 18:13 ` oliver dot kellogg at eads dot com
2008-05-25 18:18 ` oliver dot kellogg at eads dot com
` (7 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from oliver dot kellogg at eads dot com 2008-05-25 18:12 -------
Created an attachment (id=15681)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15681&action=view)
gnat1 (trunk r135848) output from -fmem-report, no aggregate assignments
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (8 preceding siblings ...)
2008-05-25 18:13 ` oliver dot kellogg at eads dot com
@ 2008-05-25 18:18 ` oliver dot kellogg at eads dot com
2008-05-25 18:43 ` oliver dot kellogg at eads dot com
` (6 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from oliver dot kellogg at eads dot com 2008-05-25 18:17 -------
Created an attachment (id=15682)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15682&action=view)
same as above but with assignments in pkg001u.adb lines 296 and 377 enabled
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (9 preceding siblings ...)
2008-05-25 18:18 ` oliver dot kellogg at eads dot com
@ 2008-05-25 18:43 ` oliver dot kellogg at eads dot com
2008-05-25 18:57 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-05-25 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from oliver dot kellogg at eads dot com 2008-05-25 18:43 -------
Created an attachment (id=15683)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15683&action=view)
att15682 was incorrect, two assignments already exhaust the memory. memreport
for _one_ assignmt.
--
oliver dot kellogg at eads dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15682|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (10 preceding siblings ...)
2008-05-25 18:43 ` oliver dot kellogg at eads dot com
@ 2008-05-25 18:57 ` rguenth at gcc dot gnu dot org
2008-06-01 18:11 ` oliver dot kellogg at eads dot com
` (4 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-25 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2008-05-25 18:56 -------
ada/utils2.c:1774 (build_simple_component_ref) 111547200:71.1%
clearly a frontend issue.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-05-25 18:56:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (11 preceding siblings ...)
2008-05-25 18:57 ` rguenth at gcc dot gnu dot org
@ 2008-06-01 18:11 ` oliver dot kellogg at eads dot com
2008-06-01 18:29 ` oliver dot kellogg at eads dot com
` (3 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-06-01 18:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from oliver dot kellogg at eads dot com 2008-06-01 18:10 -------
Created an attachment (id=15708)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15708&action=view)
instrumentation of build_simple_component_ref (for analysis only)
I put in some putchar calls of different letters to see where the code is
going.
The code formatting looks bad but maintains the original line numbers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (12 preceding siblings ...)
2008-06-01 18:11 ` oliver dot kellogg at eads dot com
@ 2008-06-01 18:29 ` oliver dot kellogg at eads dot com
2008-06-01 18:57 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-06-01 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from oliver dot kellogg at eads dot com 2008-06-01 18:28 -------
Created an attachment (id=15709)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15709&action=view)
console output from gnat1 with the above instrumentation
The following pattern occurs extremely often:
'C' (DECL_CONTEXT (field) != record_type), line 1716
'D' (!new_field), line 1735
'J' (!field), line 1753, return NULL_TREE
'H' retval from call at line 1744 was NULL
'E' (DECL_INTERNAL_P (new_field)) on next iteration of loop at line 1736
'M' now in new call to build_simple_component_ref
'P' return fold (ref); at line 1800
'F' just before next call to build_simple_component_ref at line 1744
and back up to 'C'.
(I am still trying to understand what is actually happening.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (13 preceding siblings ...)
2008-06-01 18:29 ` oliver dot kellogg at eads dot com
@ 2008-06-01 18:57 ` rguenth at gcc dot gnu dot org
2008-06-02 19:16 ` oliver dot kellogg at eads dot com
2008-08-21 5:42 ` oliver dot kellogg at eads dot com
16 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-01 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2008-06-01 18:56 -------
You can look at the original IL generated, I guess the assignments simply
contain
millions of element assignments (-fdump-tree-original).
??? tree nodes created
Kind Nodes Bytes
...
refs 2903482 115769372
some Ada guy needs to look into this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (14 preceding siblings ...)
2008-06-01 18:57 ` rguenth at gcc dot gnu dot org
@ 2008-06-02 19:16 ` oliver dot kellogg at eads dot com
2008-08-21 5:42 ` oliver dot kellogg at eads dot com
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-06-02 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from oliver dot kellogg at eads dot com 2008-06-02 19:16 -------
Created an attachment (id=15715)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15715&action=view)
output from -fdump-tree-original of gnat1 compiling pkg001u.adb
(in reply to comment #15)
> You can look at the original IL generated, I guess the assignments simply
> contain
> millions of element assignments (-fdump-tree-original).
Ah, thanks.
I believe the code at line 29417 represents the problematic assignment
(pkg001u.adb line 296), could somebody check?
Some of this stuff looks strange to the layman's eye, for example
around line 29402:
<<< Unknown tree: loop_stmt
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug ada/34898] Excessive memory consumption during compilation
2008-01-21 8:06 [Bug ada/34898] New: Excessive memory consumption during compilation oliver dot kellogg at eads dot com
` (15 preceding siblings ...)
2008-06-02 19:16 ` oliver dot kellogg at eads dot com
@ 2008-08-21 5:42 ` oliver dot kellogg at eads dot com
16 siblings, 0 replies; 19+ messages in thread
From: oliver dot kellogg at eads dot com @ 2008-08-21 5:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from oliver dot kellogg at eads dot com 2008-08-21 05:41 -------
Created an attachment (id=16118)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16118&action=view)
regenerated statistics: trunk r139367 gnat1-gnat95 -fmem-report -fdump-tree-all
pkg001u.adb
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34898
^ permalink raw reply [flat|nested] 19+ messages in thread