* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
@ 2008-06-11 14:06 ` pluto at agmk dot net
2008-06-11 14:11 ` pluto at agmk dot net
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pluto at agmk dot net 2008-06-11 14:05 -------
Created an attachment (id=15749)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15749&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
2008-06-11 14:06 ` [Bug other/36498] " pluto at agmk dot net
@ 2008-06-11 14:11 ` pluto at agmk dot net
2008-06-11 14:47 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 14:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pluto at agmk dot net 2008-06-11 14:10 -------
testcase tested with:
$ i486-gnu-linux-g++ -g0 -O2 -std=gnu++0x -fno-threadsafe-statics
-fPIC hescoreScr.ii -c
gdb report still the same backtrace:
(gdb) bt
#0 0x000000000066891b in set_bb_for_stmt ()
#1 0x000000000069c4cb in create_phi_node ()
#2 0x000000000068d066 in insert_phi_nodes_for ()
#3 0x000000000068d3e8 in insert_updated_phi_nodes_for ()
#4 0x000000000068e59c in update_ssa ()
#5 0x00000000006bd21a in compute_may_aliases ()
#6 0x00000000005f2c8a in execute_function_todo ()
#7 0x00000000005f274d in execute_todo ()
#8 0x00000000005f294a in execute_one_pass ()
#9 0x00000000005f2a9c in execute_pass_list ()
#10 0x00000000005f2aae in execute_pass_list ()
#11 0x0000000000695892 in tree_rest_of_compilation ()
#12 0x0000000000792902 in cgraph_expand_function ()
#13 0x000000000079404e in cgraph_optimize ()
#14 0x00000000004482ef in cp_write_global_declarations ()
#15 0x000000000066362e in toplev_main ()
#16 0x00002b69a416c4a4 in __libc_start_main () from /lib64/libc.so.6
#17 0x00000000004023a9 in _start ()
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet| |i486-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
2008-06-11 14:06 ` [Bug other/36498] " pluto at agmk dot net
2008-06-11 14:11 ` pluto at agmk dot net
@ 2008-06-11 14:47 ` rguenth at gcc dot gnu dot org
2008-06-11 14:56 ` rguenth at gcc dot gnu dot org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 14:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-06-11 14:46 -------
Eventually the fix for PR36154 may be the cause. Can you check backing out
2008-05-08 Richard Guenther <rguenther@suse.de>
PR middle-end/36154
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Make
sure to create a representative for trailing arrays for PTA.
?
Or the fix for PR36339, which would be
2008-05-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36339
* tree-ssa-alias.c (set_initial_properties): Move pt_anything
and subvariable clobbering code out of the loop.
2008-05-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36339
* tree-ssa-alias.c (set_initial_properties): Escaped pt_anything
pointers cause all addressable variables to be call clobbered.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (2 preceding siblings ...)
2008-06-11 14:47 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 14:56 ` rguenth at gcc dot gnu dot org
2008-06-11 15:21 ` rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-06-11 14:55 -------
Created an attachment (id=15750)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15750&action=view)
unincluded testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (3 preceding siblings ...)
2008-06-11 14:56 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 15:21 ` rguenth at gcc dot gnu dot org
2008-06-11 19:28 ` pluto at agmk dot net
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 15:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-06-11 15:20 -------
The offending function is
virtual bool hcScr::hescoreScr::init(Tcl_Interp*, hc::IAccessBase*,
vcm::vcmptr<cfgmgr::IConfigManager>)
but probably only after inlining. The trunk is fine, as is compiling
with --param max-fields-for-field-sensitive=0.
Most of the time/memory is spent in update_ssa () in phi-insertion.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |compile-time-hog, memory-hog
Known to work|4.3.0 |4.3.0 4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2008-06-11 15:20:43
date| |
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (4 preceding siblings ...)
2008-06-11 15:21 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 19:28 ` pluto at agmk dot net
2008-06-11 19:36 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 19:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pluto at agmk dot net 2008-06-11 19:27 -------
this patch causes regression.
------------------------------------------------------------------------
r135125 | rguenth | 2008-05-09 21:19:33 +0200 (Fri, 09 May 2008) | 10 lines
2008-05-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36187
* tree-dfa.c (dump_variable): Correct dumping of
SFT_BASE_FOR_COMPONENTS_P.
* tree-ssa-structalias.c (set_uids_in_ptset): Set
SFT_UNPARTITIONABLE_P correctly for the union case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (5 preceding siblings ...)
2008-06-11 19:28 ` pluto at agmk dot net
@ 2008-06-11 19:36 ` rguenth at gcc dot gnu dot org
2008-06-11 20:15 ` pluto at agmk dot net
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 19:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-06-11 19:36 -------
Then the following should fix it.
Index: tree-flow-inline.h
===================================================================
--- tree-flow-inline.h (revision 135770)
+++ tree-flow-inline.h (working copy)
@@ -1712,6 +1712,11 @@ var_can_have_subvars (const_tree v)
if (!DECL_P (v) || MTAG_P (v))
return false;
+ /* Unions cannot have subvars. */
+ if (TREE_CODE (TREE_TYPE (v)) == UNION_TYPE
+ || TREE_CODE (TREE_TYPE (v)) == QUAL_UNION_TYPE)
+ return false;
+
/* Aggregates can have subvars. */
if (AGGREGATE_TYPE_P (TREE_TYPE (v)))
return true;
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2008-06-11 15:20:43 |2008-06-11 19:36:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (6 preceding siblings ...)
2008-06-11 19:36 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 20:15 ` pluto at agmk dot net
2008-06-11 20:42 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 20:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pluto at agmk dot net 2008-06-11 20:14 -------
(In reply to comment #7)
> Then the following should fix it.
>
> Index: tree-flow-inline.h
> ===================================================================
> --- tree-flow-inline.h (revision 135770)
> +++ tree-flow-inline.h (working copy)
> @@ -1712,6 +1712,11 @@ var_can_have_subvars (const_tree v)
> if (!DECL_P (v) || MTAG_P (v))
> return false;
>
> + /* Unions cannot have subvars. */
> + if (TREE_CODE (TREE_TYPE (v)) == UNION_TYPE
> + || TREE_CODE (TREE_TYPE (v)) == QUAL_UNION_TYPE)
> + return false;
> +
> /* Aggregates can have subvars. */
> if (AGGREGATE_TYPE_P (TREE_TYPE (v)))
> return true;
>
with this change g++ needs ~1GB and ~4minutes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (7 preceding siblings ...)
2008-06-11 20:15 ` pluto at agmk dot net
@ 2008-06-11 20:42 ` rguenth at gcc dot gnu dot org
2008-06-11 20:50 ` pluto at agmk dot net
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2008-06-11 20:41 -------
Hm, the patch in comment #6 only affects the case where we have a union with
subvars. Did you check that just reverting this patch brings us back to
580MB and 1min32?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (8 preceding siblings ...)
2008-06-11 20:42 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 20:50 ` pluto at agmk dot net
2008-06-11 21:05 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pluto at agmk dot net 2008-06-11 20:50 -------
(In reply to comment #9)
> Hm, the patch in comment #6 only affects the case where we have a union with
> subvars. Did you check that just reverting this patch brings us back to
> 580MB and 1min32?
yes, i've checked r135124 and it needs only ~580MB.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (9 preceding siblings ...)
2008-06-11 20:50 ` pluto at agmk dot net
@ 2008-06-11 21:05 ` rguenth at gcc dot gnu dot org
2008-06-11 21:18 ` pluto at agmk dot net
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2008-06-11 21:04 -------
Ah, but that test also reverts all followup patches, like
2008-05-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36339
* tree-ssa-alias.c (set_initial_properties): Move pt_anything
and subvariable clobbering code out of the loop.
2008-05-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36339
* tree-ssa-alias.c (set_initial_properties): Escaped pt_anything
pointers cause all addressable variables to be call clobbered.
so, did you apply the patch in comment #7 on top of r135125 or on top
of the branch head?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (10 preceding siblings ...)
2008-06-11 21:05 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 21:18 ` pluto at agmk dot net
2008-06-13 8:43 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pluto at agmk dot net @ 2008-06-11 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pluto at agmk dot net 2008-06-11 21:17 -------
(In reply to comment #11)
> Ah, but that test also reverts all followup patches, like
> (...)
> so, did you apply the patch in comment #7 on top of r135125 or on top
> of the branch head?
on top of the branch head (r136662).
summary:
r135124 needs max. 580MB(the 'virt' column from htop)/~1.5min
r135125 and newer needs at least 4.3GB/14min.
r136662 with suggested patch needs ~1GB/4min.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (11 preceding siblings ...)
2008-06-11 21:18 ` pluto at agmk dot net
@ 2008-06-13 8:43 ` rguenth at gcc dot gnu dot org
2008-06-13 21:53 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-13 8:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2008-06-13 08:42 -------
Subject: Bug 36498
Author: rguenth
Date: Fri Jun 13 08:41:45 2008
New Revision: 136744
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136744
Log:
2008-06-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36498
* tree-flow-inline.h (var_can_have_subvars): Unions cannot
have subvars.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/tree-flow-inline.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (12 preceding siblings ...)
2008-06-13 8:43 ` rguenth at gcc dot gnu dot org
@ 2008-06-13 21:53 ` mmitchel at gcc dot gnu dot org
2008-06-14 22:04 ` rguenther at suse dot de
2008-06-23 10:14 ` rguenth at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-06-13 21:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from mmitchel at gcc dot gnu dot org 2008-06-13 21:53 -------
Richard --
Is this still an issue, after your patch?
Thanks,
-- Mark
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (13 preceding siblings ...)
2008-06-13 21:53 ` mmitchel at gcc dot gnu dot org
@ 2008-06-14 22:04 ` rguenther at suse dot de
2008-06-23 10:14 ` rguenth at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: rguenther at suse dot de @ 2008-06-14 22:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenther at suse dot de 2008-06-14 22:04 -------
Subject: Re: [4.3 Regression] time/memory hog for large
c++ source.
On Fri, 13 Jun 2008, mmitchel at gcc dot gnu dot org wrote:
> Richard --
>
> Is this still an issue, after your patch?
It's still 4 times slower and uses twice as much memory. It will
be fixed with the partitioning patch I posted yesterday.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug other/36498] [4.3 Regression] time/memory hog for large c++ source.
2008-06-11 14:05 [Bug other/36498] New: [4.3 Regression] time/memory hog for large c++ source pluto at agmk dot net
` (14 preceding siblings ...)
2008-06-14 22:04 ` rguenther at suse dot de
@ 2008-06-23 10:14 ` rguenth at gcc dot gnu dot org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-23 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from rguenth at gcc dot gnu dot org 2008-06-23 10:13 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36498
^ permalink raw reply [flat|nested] 17+ messages in thread