public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/26830]  New: Insane amount of compile-time / memory needed at -O1 and up
@ 2006-03-23 16:45 rguenth at gcc dot gnu dot org
  2006-03-23 16:48 ` [Bug tree-optimization/26830] " rguenth at gcc dot gnu dot org
                   ` (39 more replies)
  0 siblings, 40 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 16:45 UTC (permalink / raw)
  To: gcc-bugs

At -O1 and up we need a huge amount of memory and compile-time to compile the
testcase.  My x86_64 box is at 3GB ram and > 30min now, still building.


-- 
           Summary: Insane amount of compile-time / memory needed at -O1 and
                    up
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: memory-hog, compile-time-hog
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

* [Bug tree-optimization/26830] Insane amount of compile-time / memory needed at -O1 and up
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
@ 2006-03-23 16:48 ` rguenth at gcc dot gnu dot org
  2006-03-23 16:56 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (38 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-03-23 16:48 -------
Created an attachment (id=11106)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11106&action=view)
testcase


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and up
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
  2006-03-23 16:48 ` [Bug tree-optimization/26830] " rguenth at gcc dot gnu dot org
@ 2006-03-23 16:56 ` rguenth at gcc dot gnu dot org
  2006-03-23 17:29 ` rguenth at gcc dot gnu dot org
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-03-23 16:56 -------
gcc 3.3.6 is fine on i686, 400MB ram, 30s compile time at -O1. 3.4.6 is also
fine wit -O1 -funit-at-a-time, so tree-ssa related.  4.0.3 is a little worse,
560MB and 60s, but still reasonable.  So my bet is aliasing - but who knows
until that compile finishes ;)


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Insane amount of compile-   |[4.1/4.2 Regression] Insane
                   |time / memory needed at -O1 |amount of compile-time /
                   |and up                      |memory needed at -O1 and up


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and up
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
  2006-03-23 16:48 ` [Bug tree-optimization/26830] " rguenth at gcc dot gnu dot org
  2006-03-23 16:56 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
@ 2006-03-23 17:29 ` rguenth at gcc dot gnu dot org
  2006-03-23 17:36 ` rguenth at gcc dot gnu dot org
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 17:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-03-23 17:29 -------
-fno-tree-salias brings us back to sane behavior.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and up
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-03-23 17:29 ` rguenth at gcc dot gnu dot org
@ 2006-03-23 17:36 ` rguenth at gcc dot gnu dot org
  2006-03-23 21:03 ` rguenth at gcc dot gnu dot org
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 17:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2006-03-23 17:36 -------
Well, not exactly sane, but topping at 630MB and finishing after 6min, which is
enough of a regression.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and up
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-03-23 17:36 ` rguenth at gcc dot gnu dot org
@ 2006-03-23 21:03 ` rguenth at gcc dot gnu dot org
  2006-03-23 21:15 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed by into-ssa rguenth at gcc dot gnu dot org
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 21:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2006-03-23 21:03 -------
Now, with -O -fno-tree-salias we have

 tree copy propagation :   4.30 ( 1%) usr   0.06 ( 0%) sys   4.48 ( 1%) wall
1076 kB ( 0%) ggc
 tree SSA rewrite      : 280.55 (76%) usr   0.44 ( 3%) sys 287.70 (69%) wall
8254 kB ( 3%) ggc
 tree SSA incremental  :  25.32 ( 7%) usr   0.24 ( 2%) sys  26.91 ( 6%) wall
4307 kB ( 1%) ggc
 TOTAL                 : 366.85            15.64           419.93            
305294 kB

eh...!?  now it would be interesting to know what pass caused this.

CPU: P4 / Xeon, speed 2799.93 MHz (estimated)
Counted UOPS_RETIRED events (retired uops) with a unit mask of 0x01 (count
marked uops which are non-bogus) count 45000
samples  %        image name               symbol name
6902     67.2055  cc1plus                  rewrite_update_phi_arguments
438       4.2648  cc1plus                  update_ssa
314       3.0574  cc1plus                  rewrite_update_init_block
200       1.9474  cc1plus                  walk_dominator_tree
149       1.4508  cc1plus                  compute_global_livein
138       1.3437  cc1plus                  next_dom_son
121       1.1782  cc1plus                  bitmap_bit_p
111       1.0808  cc1plus                  delete_update_ssa
108       1.0516  no-vmlinux               (no symbols)


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed by into-ssa
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-03-23 21:03 ` rguenth at gcc dot gnu dot org
@ 2006-03-23 21:15 ` rguenth at gcc dot gnu dot org
  2006-03-23 21:37 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above rguenth at gcc dot gnu dot org
                   ` (33 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 21:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2006-03-23 21:15 -------
I blame into-ssa


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
            Summary|[4.1/4.2 Regression] Insane |[4.1/4.2 Regression] Insane
                   |amount of compile-time /    |amount of compile-time /
                   |memory needed at -O1 and up |memory needed by into-ssa


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-03-23 21:15 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed by into-ssa rguenth at gcc dot gnu dot org
@ 2006-03-23 21:37 ` rguenth at gcc dot gnu dot org
  2006-03-23 22:09 ` rguenth at gcc dot gnu dot org
                   ` (32 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 21:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2006-03-23 21:37 -------
And I'm wrong.  It's loop header copying!(?!)


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|dnovillo at gcc dot gnu dot |rakdver at gcc dot gnu dot
                   |org                         |org
            Summary|[4.1/4.2 Regression] Insane |[4.1/4.2 Regression] Insane
                   |amount of compile-time /    |amount of compile-time /
                   |memory needed by into-ssa   |memory needed at -O1 and
                   |                            |above


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-03-23 21:37 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above rguenth at gcc dot gnu dot org
@ 2006-03-23 22:09 ` rguenth at gcc dot gnu dot org
  2006-03-24  8:43 ` rguenth at gcc dot gnu dot org
                   ` (31 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 22:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2006-03-23 22:09 -------
With structure aliasing on, we create 22326 SFTs for the
CShadingContext::execute function.  Aliasing completely breaks down then:

execute: Total number of aliased vops: 18901314
execute: Total number of aliased vops after grouping: 4421064

Referenced variables in execute: 80934

This all results in lots of basic blocks with hundreds of PHI nodes with
hundreds of incoming edges in alias1.  This is insane!  Like

  # SFT.14821_22241 = PHI <SFT.14821_41418(2), ... , SFT.14821_22241(9627)>;
(that line is 20000 characters long!  Which makes roughly 1000 phi arguments!)

and there are 8800 such PHI_EXPRs for just one basic block!


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-03-23 22:09 ` rguenth at gcc dot gnu dot org
@ 2006-03-24  8:43 ` rguenth at gcc dot gnu dot org
  2006-03-24 14:15 ` bonzini at gnu dot org
                   ` (30 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-24  8:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2006-03-24 08:43 -------
Ok, without -fno-tree-salias things are just worse, not different:

 tree copy propagation : 134.88 ( 2%) usr   0.67 (10%) sys 136.04 ( 2%) wall   
6573 kB ( 0%) ggc
 tree store copy prop  :  26.55 ( 0%) usr   0.01 ( 0%) sys  26.56 ( 0%) wall   
1602 kB ( 0%) ggc
 tree PHI insertion    :  75.16 ( 1%) usr   1.80 (27%) sys  76.97 ( 1%) wall
1512507 kB (76%) ggc
 tree SSA rewrite      :6874.42 (89%) usr   0.20 ( 3%) sys6875.24 (89%) wall  
22257 kB ( 1%) ggc
 tree SSA incremental  : 281.55 ( 4%) usr   0.11 ( 2%) sys 281.64 ( 4%) wall  
10460 kB ( 1%) ggc
 dominator optimization:  65.92 ( 1%) usr   0.03 ( 0%) sys  65.96 ( 1%) wall  
20197 kB ( 1%) ggc
 tree loop init        :  30.19 ( 0%) usr   0.00 ( 0%) sys  30.20 ( 0%) wall   
   9 kB ( 0%) ggc
 tree SSA uncprop      :  28.22 ( 0%) usr   0.01 ( 0%) sys  28.22 ( 0%) wall   
   0 kB ( 0%) ggc
 dominance frontiers   :  21.44 ( 0%) usr   0.02 ( 0%) sys  21.40 ( 0%) wall   
   0 kB ( 0%) ggc
 expand                :  61.70 ( 1%) usr   0.07 ( 1%) sys  61.83 ( 1%) wall  
49925 kB ( 3%) ggc
 TOTAL                 :7709.86             6.60          7717.99           
1990005 kB

(that was ia64 with 4.1.0, sorry)

I believe there's something wrong with the data-structures compared to what
we had in 4.0.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-03-24  8:43 ` rguenth at gcc dot gnu dot org
@ 2006-03-24 14:15 ` bonzini at gnu dot org
  2006-03-24 14:16 ` bonzini at gnu dot org
                   ` (29 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-24 14:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bonzini at gnu dot org  2006-03-24 14:15 -------
so it may even be that something creates an incredibly interconnected CFG?

can you add a test somewhere in execute_one_pass to print the number of basic
blocks and the total number of edges?  along these lines:

if (pass->name && current_function_decl && (curr_properties & PROP_cfg)) {
  tot_bb = tot_edge = 0;
  FOR_EACH_BB (bb)
    tot_bb++, tot_edge += EDGE_COUNT (bb->succ);
  fprintf ("%s %s %d %d %f", pass->name, IDENTIFIER_POINTER
                   (DECL_ASSEMBLER_NAME (current_function_decl)), 
                   tot_bb, tot_edge, ((double)tot_edge) / tot_bb);
}

Paolo


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-03-24 14:16 ` bonzini at gnu dot org
@ 2006-03-24 14:16 ` bonzini at gnu dot org
  2006-03-24 15:42 ` bonzini at gnu dot org
                   ` (27 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-24 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from bonzini at gnu dot org  2006-03-24 14:16 -------
confirming, but removing the "alias" keyword.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|alias                       |
   Last reconfirmed|0000-00-00 00:00:00         |2006-03-24 14:16:42
               date|                            |


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-03-24 14:15 ` bonzini at gnu dot org
@ 2006-03-24 14:16 ` bonzini at gnu dot org
  2006-03-24 14:16 ` bonzini at gnu dot org
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-24 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bonzini at gnu dot org  2006-03-24 14:16 -------
> so it may even be that something creates an incredibly interconnected CFG?

i mean, we may end up having the equivalent of the multiple computed gotos,
that we factor.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2006-03-24 14:16 ` bonzini at gnu dot org
@ 2006-03-24 15:42 ` bonzini at gnu dot org
  2006-03-24 15:50 ` rguenth at gcc dot gnu dot org
                   ` (26 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-24 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from bonzini at gnu dot org  2006-03-24 15:42 -------
maybe it's enough to throttle down the salias limits, depending on the number
of incoming edges in the basic block?

readding alias keyword, and ccing Dan


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org
           Keywords|                            |alias


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2006-03-24 15:42 ` bonzini at gnu dot org
@ 2006-03-24 15:50 ` rguenth at gcc dot gnu dot org
  2006-03-24 16:07 ` bonzini at gnu dot org
                   ` (25 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-24 15:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from rguenth at gcc dot gnu dot org  2006-03-24 15:50 -------
I wonder what makes us regress so much in comparison to 4.0.3.  The CFG
structure before into-ssa should be the same (-fno-inline doesn't help the
testcase).


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2006-03-24 15:50 ` rguenth at gcc dot gnu dot org
@ 2006-03-24 16:07 ` bonzini at gnu dot org
  2006-03-24 16:27 ` rguenth at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-24 16:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from bonzini at gnu dot org  2006-03-24 16:07 -------
tree_duplicate_sese_region calls update_ssa.  that makes the loop grow very
fast with the number of basic blocks.

4.0, instead, has

 5081   /* Add phi nodes for definitions at exit.  TODO -- once we have
immediate
 5082      uses, it should be possible to emit phi nodes just for definitions
that
 5083      are used outside region.  */
 5084   EXECUTE_IF_SET_IN_BITMAP (definitions, 0, ver, bi)
 5085     {
 5086       tree name = ssa_name (ver);
 5087 
 5088       phi = create_phi_node (name, exit->dest);
 5089       add_phi_arg (phi, name, exit);
 5090       add_phi_arg (phi, name, exit_copy);
 5091 
 5092       SSA_NAME_DEF_STMT (name) = phi;
 5093     }
 5094 
 5095   /* And create new definitions inside region and its copy.  TODO -- once
we
 5096      have immediate uses, it might be better to leave definitions in
region
 5097      unchanged, create new ssa names for phi nodes on exit, and rewrite
 5098      the uses, to avoid changing the copied region.  */
 5099   allocate_ssa_names (definitions, &ssa_name_map);
 5100   rewrite_to_new_ssa_names (region, n_region, ssa_name_map);
 5101   allocate_ssa_names (definitions, &ssa_name_map);
 5102   rewrite_to_new_ssa_names (region_copy, n_region, ssa_name_map);


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2006-03-24 16:07 ` bonzini at gnu dot org
@ 2006-03-24 16:27 ` rguenth at gcc dot gnu dot org
  2006-03-24 16:33 ` rguenth at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-24 16:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2006-03-24 16:26 -------
With -O1 -fno-tree-ch we get (on ia64 again):

 tree copy propagation : 132.88 (22%) usr   0.07 ( 1%) sys 132.94 (22%) wall   
5037 kB ( 0%) ggc
 tree store copy prop  :  27.43 ( 5%) usr   0.01 ( 0%) sys  27.44 ( 5%) wall   
1090 kB ( 0%) ggc
 tree PHI insertion    :  79.40 (13%) usr   1.74 (31%) sys  81.14 (13%) wall
1512507 kB (77%) ggc
 tree SSA rewrite      :  94.23 (16%) usr   0.09 ( 2%) sys  94.32 (16%) wall  
22257 kB ( 1%) ggc
 dominator optimization:  66.17 (11%) usr   0.07 ( 1%) sys  66.24 (11%) wall  
18901 kB ( 1%) ggc
 tree loop init        :  29.35 ( 5%) usr   0.00 ( 0%) sys  29.35 ( 5%) wall   
   9 kB ( 0%) ggc
 tree SSA uncprop      :  27.61 ( 5%) usr   0.00 ( 0%) sys  27.61 ( 5%) wall   
   0 kB ( 0%) ggc
 expand                :  31.99 ( 5%) usr   0.04 ( 1%) sys  32.04 ( 5%) wall  
49360 kB ( 3%) ggc
 TOTAL                 : 599.15             5.55           604.92           
1964166 kB

so, much more mixed results, but tree copy propagation now being the worst
offender.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2006-03-24 16:27 ` rguenth at gcc dot gnu dot org
@ 2006-03-24 16:33 ` rguenth at gcc dot gnu dot org
  2006-03-27  7:22 ` bonzini at gnu dot org
                   ` (22 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-24 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2006-03-24 16:33 -------
Now compare numbers from 4.0.3 (i686 again):

 tree PHI insertion    :   6.50 (12%) usr   0.06 ( 2%) sys   6.99 (11%) wall
 tree SSA rewrite      :   8.25 (15%) usr   0.02 ( 1%) sys   8.75 (14%) wall
 tree SSA other        :   3.18 ( 6%) usr   0.20 ( 6%) sys   5.07 ( 8%) wall
 dominator optimization:   8.73 (16%) usr   0.06 ( 2%) sys   8.87 (14%) wall
 global alloc          :   4.58 ( 8%) usr   0.27 ( 9%) sys   5.28 ( 8%) wall
 TOTAL                 :  53.96             3.08            63.37

the usual and expected offender, DOM.  But you can also imagine the big PHIs
there.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2006-03-24 16:33 ` rguenth at gcc dot gnu dot org
@ 2006-03-27  7:22 ` bonzini at gnu dot org
  2006-03-27  7:37 ` bonzini at gnu dot org
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-27  7:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from bonzini at gnu dot org  2006-03-27 07:22 -------
I'm looking at copy prop.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2006-03-27  7:22 ` bonzini at gnu dot org
@ 2006-03-27  7:37 ` bonzini at gnu dot org
  2006-03-30  9:17 ` bonzini at gnu dot org
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-27  7:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from bonzini at gnu dot org  2006-03-27 07:37 -------
 tree copy propagation :  18.58 ( 2%) usr   0.01 ( 0%) sys  18.54 ( 2%) wall   
2369 kB ( 0%) ggc
 tree PHI insertion    :  34.49 ( 4%) usr   0.85 (23%) sys  35.34 ( 4%) wall 
758641 kB (79%) ggc
 tree SSA rewrite      :  43.98 ( 6%) usr   0.02 ( 1%) sys  43.96 ( 6%) wall  
10954 kB ( 1%) ggc
 dominator optimization:   9.97 ( 1%) usr   0.01 ( 0%) sys  10.01 ( 1%) wall   
8694 kB ( 1%) ggc
 loop analysis         :  10.35 ( 1%) usr   1.21 (33%) sys  11.76 ( 1%) wall   
 463 kB ( 0%) ggc
 global alloc          : 404.96 (51%) usr   0.14 ( 4%) sys 405.33 (51%) wall   
7244 kB ( 1%) ggc


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2006-03-27  7:37 ` bonzini at gnu dot org
@ 2006-03-30  9:17 ` bonzini at gnu dot org
  2006-03-30 14:04 ` bonzini at gnu dot org
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-30  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from bonzini at gnu dot org  2006-03-30 09:17 -------
Trying a naive patch that moves update_ssa from tree_duplicate_sese_region to
after all loop headers are copied...


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2006-03-30  9:17 ` bonzini at gnu dot org
@ 2006-03-30 14:04 ` bonzini at gnu dot org
  2006-03-30 14:31 ` bonzini at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-03-30 14:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from bonzini at gnu dot org  2006-03-30 14:04 -------
Patch bootstrapped, regtesting in progress.  With checking enabled I have this
which is not bad at all.

 tree PHI insertion    :  49.68 ( 5%)
 tree SSA rewrite      :  63.75 ( 7%)
 tree SSA incremental  :   4.75 ( 1%)
 dominator optimization:  12.66 ( 1%)
 tree loop init        :   6.25 ( 1%)
 tree SSA uncprop      :   7.68 ( 1%)
 tree SSA verifier     : 214.56 (24%)
 tree STMT verifier    : 197.87 (22%)
 expand                :  21.19 ( 2%)
 loop analysis         :  10.96 ( 1%)
 global alloc          : 276.20 (30%) <-- i think this is due to
ENABLE_CHECKING

We still consume more than a GB of memory though.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bonzini at gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-03-24 14:16:42         |2006-03-30 14:04:12
               date|                            |


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2006-03-30 14:04 ` bonzini at gnu dot org
@ 2006-03-30 14:31 ` bonzini at gcc dot gnu dot org
  2006-03-30 15:50 ` rguenth at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2006-03-30 14:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from bonzini at gnu dot org  2006-03-30 14:31 -------
Subject: Bug 26830

Author: bonzini
Date: Thu Mar 30 14:31:13 2006
New Revision: 112534

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112534
Log:
2006-03-30  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/26830

        * tree-ssa-copy.c (copy_prop_visit_assignment): Do not check loop
depth.
        (copy_prop_visit_stmt): Remove write-only variable ann.
        (init_copy_prop): Check variable loop depth here.  Do not simulate
        memory-tag and virtual operand PHIs except for store copy prop.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-copy.c


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2006-03-30 14:31 ` bonzini at gcc dot gnu dot org
@ 2006-03-30 15:50 ` rguenth at gcc dot gnu dot org
  2006-03-31  7:37 ` paolo dot bonzini at lu dot unisi dot ch
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-30 15:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from rguenth at gcc dot gnu dot org  2006-03-30 15:49 -------
Note that the regression is in 4.1, too, so we should consider backporting
changes that accumulate here to the branch after a while.


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (22 preceding siblings ...)
  2006-03-30 15:50 ` rguenth at gcc dot gnu dot org
@ 2006-03-31  7:37 ` paolo dot bonzini at lu dot unisi dot ch
  2006-04-03 13:37 ` bonzini at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: paolo dot bonzini at lu dot unisi dot ch @ 2006-03-31  7:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from paolo dot bonzini at lu dot unisi dot ch  2006-03-31 07:37 -------
Subject: Re:  [4.1/4.2 Regression] Insane amount
 of compile-time / memory needed at -O1 and above


> Note that the regression is in 4.1, too, so we should consider backporting
> changes that accumulate here to the branch after a while.
>   
Sure, but I am a bit nervous about backporting right away a change to 
parts I am not familar with.  Let's wait until a week after *all* 
patches are applied.

Paolo


-- 


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


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

* [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (23 preceding siblings ...)
  2006-03-31  7:37 ` paolo dot bonzini at lu dot unisi dot ch
@ 2006-04-03 13:37 ` bonzini at gcc dot gnu dot org
  2006-04-03 13:40 ` [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying bonzini at gnu dot org
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2006-04-03 13:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from bonzini at gnu dot org  2006-04-03 13:37 -------
Subject: Bug 26830

Author: bonzini
Date: Mon Apr  3 13:37:07 2006
New Revision: 112639

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112639
Log:
2006-04-03  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/26830
        * tree-cfg.c (tree_duplicate_sese_region): Do not update SSA.
        * tree-ssa-loop-ch.c (copy_loop_headers): Count successfully duplicated
        headers and, if there was any, update SSA at the end.

        Backport from mainline:
        2006-03-30  Paolo Bonzini  <bonzini@gnu.org>

        * tree-ssa-copy.c (copy_prop_visit_assignment): Do not check loop
depth.
        (copy_prop_visit_stmt): Remove write-only variable ann.
        (init_copy_prop): Check variable loop depth here.  Do not simulate
        memory-tag and virtual operand PHIs except for store copy prop.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/tree-cfg.c
    branches/gcc-4_1-branch/gcc/tree-ssa-copy.c
    branches/gcc-4_1-branch/gcc/tree-ssa-loop-ch.c


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (24 preceding siblings ...)
  2006-04-03 13:37 ` bonzini at gcc dot gnu dot org
@ 2006-04-03 13:40 ` bonzini at gnu dot org
  2006-04-03 14:16 ` rakdver at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-04-03 13:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from bonzini at gnu dot org  2006-04-03 13:40 -------
compile-time should be fixed on 4.1 (richard, could you confirm).  spinning a
separate bug for the salias memory hog problems.

zdenek wanted to investigate manual SSA update of real operands for 4.2


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|bonzini at gnu dot org      |unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
           Keywords|alias, memory-hog           |
      Known to work|                            |4.0.3 4.1.1
            Summary|[4.1/4.2 Regression] Insane |[4.2 Regression] Repeated
                   |amount of compile-time /    |SSA update during loop
                   |memory needed at -O1 and    |header copying
                   |above                       |
            Version|4.1.0                       |4.2.0


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (25 preceding siblings ...)
  2006-04-03 13:40 ` [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying bonzini at gnu dot org
@ 2006-04-03 14:16 ` rakdver at gcc dot gnu dot org
  2006-04-03 16:20 ` rguenth at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-04-03 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from rakdver at gcc dot gnu dot org  2006-04-03 14:16 -------
With a bit simplified testcase (my computer does not have enough memory for
this one), we spend 30% of compile time in rewrite_update_phi_arguments.
However, only 1.6% (less then 1% of compile time) of the
rewrite_update_phi_arguments calls actually changes anything, so the rest is
just traversing a dominance tree and visiting the phi nodes; perhaps this could
be optimized somehow.


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (26 preceding siblings ...)
  2006-04-03 14:16 ` rakdver at gcc dot gnu dot org
@ 2006-04-03 16:20 ` rguenth at gcc dot gnu dot org
  2006-04-03 16:31 ` rakdver at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-03 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #28 from rguenth at gcc dot gnu dot org  2006-04-03 16:20 -------
I confirm, that with -fno-tree-salias -O1 4.1.1 is on-par with -O1 4.0.3.  So
all remaining compile-time/memory problems are due to extra virtual operands.


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (27 preceding siblings ...)
  2006-04-03 16:20 ` rguenth at gcc dot gnu dot org
@ 2006-04-03 16:31 ` rakdver at gcc dot gnu dot org
  2006-04-04  9:21 ` bonzini at gnu dot org
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-04-03 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #29 from rakdver at gcc dot gnu dot org  2006-04-03 16:31 -------
(In reply to comment #27)
> With a bit simplified testcase (my computer does not have enough memory for
> this one), we spend 30% of compile time in rewrite_update_phi_arguments.
> However, only 1.6% (less then 1% of compile time) of the
> rewrite_update_phi_arguments calls actually changes anything, so the rest is
> just traversing a dominance tree and visiting the phi nodes; perhaps this could
> be optimized somehow.

I have a patch that gets rewrite_update_phi_arguments below 1% of compile time
(cutting the total compile time from 190 to 100s).  Still, a lot of time is
spent in tree SSA incremental (30%), I will have a look at that.  One obvious
problem is that update_ssa calls FOR_EACH_BB (and iterates for each stmt in
it), thus leading to quadratic behavior if it is used too often; I think it
should be possible to avoid.


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (28 preceding siblings ...)
  2006-04-03 16:31 ` rakdver at gcc dot gnu dot org
@ 2006-04-04  9:21 ` bonzini at gnu dot org
  2006-04-04 10:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-04-04  9:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #30 from bonzini at gnu dot org  2006-04-04 09:20 -------
Zdenek: are you using walk_data->interesting_blocks to not visit PHI nodes on
non-interesting blocks?


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (29 preceding siblings ...)
  2006-04-04  9:21 ` bonzini at gnu dot org
@ 2006-04-04 10:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
  2006-04-04 14:29 ` bonzini at gnu dot org
                   ` (8 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at atrey dot karlin dot mff dot cuni dot cz @ 2006-04-04 10:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #31 from rakdver at atrey dot karlin dot mff dot cuni dot cz  2006-04-04 10:20 -------
Subject: Re:  [4.2 Regression] Repeated SSA update during loop header copying

> Zdenek: are you using walk_data->interesting_blocks to not visit PHI nodes on
> non-interesting blocks?

No, I am keeping lists of interesting phi nodes in each basic block (see
the patch below -- without the time measurement code, of course).  Using
just interesting_blocks might be simpler, I will try how much that
helps.

Index: tree-into-ssa.c
===================================================================
*** tree-into-ssa.c     (revision 112625)
--- tree-into-ssa.c     (working copy)
*************** Boston, MA 02110-1301, USA.  */
*** 47,52 ****
--- 47,53 ----
  #include "domwalk.h"
  #include "ggc.h"
  #include "params.h"
+ #include "toplev.h"

  /* This file builds the SSA form for a function as described in:
     R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck. Efficiently
*************** get_default_def_for (tree sym)
*** 777,782 ****
--- 778,800 ----
    return ddef;
  }

+ /* Marks phi node PHI in basic block BB for rewrite.  */
+ 
+ static void
+ mark_phi_for_rewrite (basic_block bb, tree phi)
+ {
+   VEC (tree, heap) *phis_to_rewrite;
+ 
+   if (REWRITE_THIS_STMT (phi))
+     return;
+ 
+   phis_to_rewrite = bb->aux;
+   if (!phis_to_rewrite)
+     phis_to_rewrite = VEC_alloc (tree, heap, 10);
+   REWRITE_THIS_STMT (phi) = 1;
+   VEC_safe_push (tree, heap, phis_to_rewrite, phi);
+   bb->aux = phis_to_rewrite;
+ }

  /* Insert PHI nodes for variable VAR using the iterated dominance
     frontier given in PHI_INSERTION_POINTS.  If UPDATE_P is true, this
*************** insert_phi_nodes_for (tree var, bitmap p
*** 846,852 ****

        /* Mark this PHI node as interesting for update_ssa.  */
        REGISTER_DEFS_IN_THIS_STMT (phi) = 1;
!       REWRITE_THIS_STMT (phi) = 1;
      }
  }

--- 864,870 ----

        /* Mark this PHI node as interesting for update_ssa.  */
        REGISTER_DEFS_IN_THIS_STMT (phi) = 1;
!       mark_phi_for_rewrite (bb, phi);
      }
  }

*************** replace_use (use_operand_p use_p, tree u
*** 1497,1502 ****
--- 1515,1522 ----
      SET_USE (use_p, rdef);
  }

+ unsigned long upi_cas_useful, upi_cas_total;
+ unsigned upi_calls, upi_did;

  /* Visit all the successor blocks of BB looking for PHI nodes.  For
     every PHI node found, check if any of its arguments is in
*************** rewrite_update_phi_arguments (struct dom
*** 1509,1527 ****
  {
    edge e;
    edge_iterator ei;

    FOR_EACH_EDGE (e, ei, bb->succs)
      {
        tree phi;

!       for (phi = phi_nodes (e->dest); phi; phi = PHI_CHAIN (phi))
        {
          tree arg;
          use_operand_p arg_p;

!         /* Skip PHI nodes that are not marked for rewrite.  */
!         if (!REWRITE_THIS_STMT (phi))
!           continue;

          arg_p = PHI_ARG_DEF_PTR_FROM_EDGE (phi, e);
          arg = USE_FROM_PTR (arg_p);
--- 1529,1556 ----
  {
    edge e;
    edge_iterator ei;
+   unsigned i;
+   unsigned ohi, olo;
+   unsigned long long cas;
+   bool did = false;
+ 
+   rdtsc(ohi, olo);
+   upi_calls++;

    FOR_EACH_EDGE (e, ei, bb->succs)
      {
        tree phi;
+       VEC (tree, heap) *phis_to_rewrite = e->dest->aux;

!       if (!phis_to_rewrite)
!       continue;
! 
!       for (i = 0; VEC_iterate (tree, phis_to_rewrite, i, phi); i++)
        {
          tree arg;
          use_operand_p arg_p;

!         gcc_assert (REWRITE_THIS_STMT (phi));

          arg_p = PHI_ARG_DEF_PTR_FROM_EDGE (phi, e);
          arg = USE_FROM_PTR (arg_p);
*************** rewrite_update_phi_arguments (struct dom
*** 1534,1539 ****
--- 1563,1569 ----
              /* When updating a PHI node for a recently introduced
                 symbol we may find NULL arguments.  That's why we
                 take the symbol from the LHS of the PHI node.  */
+             did = true;
              replace_use (arg_p, SSA_NAME_VAR (PHI_RESULT (phi)));
            }
          else
*************** rewrite_update_phi_arguments (struct dom
*** 1541,1555 ****
              tree sym = DECL_P (arg) ? arg : SSA_NAME_VAR (arg);

              if (symbol_marked_for_renaming (sym))
!               replace_use (arg_p, sym);
              else if (is_old_name (arg))
!               replace_use (arg_p, arg);
            }

          if (e->flags & EDGE_ABNORMAL)
            SSA_NAME_OCCURS_IN_ABNORMAL_PHI (USE_FROM_PTR (arg_p)) = 1;
        }
      }
  }


--- 1571,1599 ----
              tree sym = DECL_P (arg) ? arg : SSA_NAME_VAR (arg);

              if (symbol_marked_for_renaming (sym))
!               {
!                 did = true;
!                 replace_use (arg_p, sym);
!               }
              else if (is_old_name (arg))
!               {
!                 did = true;
!                 replace_use (arg_p, arg);
!               }
            }

          if (e->flags & EDGE_ABNORMAL)
            SSA_NAME_OCCURS_IN_ABNORMAL_PHI (USE_FROM_PTR (arg_p)) = 1;
        }
      }
+ 
+   cas = ttm_stop (ohi, olo);
+   if (did)
+     {
+       upi_did++;
+       upi_cas_useful += cas;
+     }
+   upi_cas_total += cas;
  }


*************** static inline void
*** 1838,1844 ****
  mark_use_interesting (tree var, tree stmt, basic_block bb, bitmap blocks,
                      bool insert_phi_p)
  {
!   REWRITE_THIS_STMT (stmt) = 1;
    bitmap_set_bit (blocks, bb->index);

    /* If VAR has not been defined in BB, then it is live-on-entry
--- 1882,1891 ----
  mark_use_interesting (tree var, tree stmt, basic_block bb, bitmap blocks,
                      bool insert_phi_p)
  {
!   if (TREE_CODE (stmt) == PHI_NODE)
!     mark_phi_for_rewrite (bb_for_stmt (stmt), stmt);
!   else
!     REWRITE_THIS_STMT (stmt) = 1;
    bitmap_set_bit (blocks, bb->index);

    /* If VAR has not been defined in BB, then it is live-on-entry
*************** update_ssa (unsigned update_flags)
*** 2679,2684 ****
--- 2726,2732 ----
        block_stmt_iterator si;
        tree phi;

+       gcc_assert (bb->aux == NULL);
        for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
        {
          REWRITE_THIS_STMT (phi) = 0;
*************** update_ssa (unsigned update_flags)
*** 2835,2840 ****
--- 2883,2897 ----

    /* Free allocated memory.  */
  done:
+   FOR_EACH_BB (bb)
+     {
+       VEC (tree, heap) *phis_to_rewrite = bb->aux;
+       if (!phis_to_rewrite)
+       continue;
+ 
+       VEC_free (tree, heap, phis_to_rewrite);
+       bb->aux = NULL;
+     }
    BITMAP_FREE (blocks);
    delete_update_ssa ();

Index: tree-ssa-loop-ch.c
===================================================================
*** tree-ssa-loop-ch.c  (revision 112625)
--- tree-ssa-loop-ch.c  (working copy)
*************** copy_loop_headers (void)
*** 145,150 ****
--- 145,151 ----
    copied_bbs = XNEWVEC (basic_block, n_basic_blocks);
    bbs_size = n_basic_blocks;

+   printf ("%d %d\n", loops->num, n_basic_blocks);
    for (i = 1; i < loops->num; i++)
      {
        /* Copy at most 20 insns.  */
Index: toplev.h
===================================================================
*** toplev.h    (revision 112625)
--- toplev.h    (working copy)
*************** exact_log2 (unsigned HOST_WIDE_INT x)
*** 189,192 ****
--- 189,206 ----
  extern const char *get_src_pwd               (void);
  extern bool set_src_pwd                      (const char *);

+ #define rdtsc(hi,lo) __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi))
+ 
+ static inline unsigned long ttm_stop(unsigned ohi, unsigned olo)
+ {
+   unsigned nhi, nlo;
+   unsigned long t1, t2;
+ 
+   rdtsc(nhi, nlo);
+ 
+   t1 = (((unsigned long) ohi) << 32) | olo;
+   t2 = (((unsigned long) nhi) << 32) | nlo;
+ 
+   return t2 - t1;
+ }
  #endif /* ! GCC_TOPLEV_H */
Index: main.c
===================================================================
*** main.c      (revision 112625)
--- main.c      (working copy)
*************** Software Foundation, 51 Franklin Street,
*** 25,30 ****
--- 25,33 ----

  int main (int argc, char **argv);

+ extern unsigned long upi_cas_useful, upi_cas_total;
+ extern unsigned upi_calls, upi_did;
+ 
  /* We define main() to call toplev_main(), which is defined in toplev.c.
     We do this in a separate file in order to allow the language front-end
     to define a different main(), if it so desires.  */
*************** int main (int argc, char **argv);
*** 32,36 ****
  int
  main (int argc, char **argv)
  {
!   return toplev_main (argc, (const char **) argv);
  }
--- 35,47 ----
  int
  main (int argc, char **argv)
  {
!   int ret;
!   unsigned ohi, olo;
!   unsigned long total;
! 
!   rdtsc (ohi, olo);
!   ret = toplev_main (argc, (const char **) argv);
!   total = ttm_stop (ohi, olo);
!   printf ("%lu time (%u calls -- %u useful, %lu useful time), total time
%lu\n", upi_cas_total, upi_calls, upi_did, upi_cas_useful, total);
!   return ret;
  }


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (30 preceding siblings ...)
  2006-04-04 10:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
@ 2006-04-04 14:29 ` bonzini at gnu dot org
  2006-04-12 12:20 ` rakdver at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-04-04 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #32 from bonzini at gnu dot org  2006-04-04 14:29 -------
Zdenek, I'm sure you can construct an example where my simple minded approach
still blows up.


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (31 preceding siblings ...)
  2006-04-04 14:29 ` bonzini at gnu dot org
@ 2006-04-12 12:20 ` rakdver at gcc dot gnu dot org
  2006-04-12 14:09 ` dnovillo at redhat dot com
                   ` (6 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-04-12 12:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #33 from rakdver at gcc dot gnu dot org  2006-04-12 12:20 -------
Created an attachment (id=11248)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11248&action=view)
Patch to speed up update_ssa

This patch makes update_ssa significantly faster in cases like this (when
update_ssa is called often), by ensuring that we do not perform unnecessary
expensive tasks (walking all statements or ssa names) each time update_ssa is
called.  Several more improvements are possible, especially in the phi
insertion phase.


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (32 preceding siblings ...)
  2006-04-12 12:20 ` rakdver at gcc dot gnu dot org
@ 2006-04-12 14:09 ` dnovillo at redhat dot com
  2006-04-12 14:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: dnovillo at redhat dot com @ 2006-04-12 14:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #34 from dnovillo at redhat dot com  2006-04-12 14:09 -------
Subject: Re:  [4.2 Regression] Repeated SSA update
 during loop header copying

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/06 08:20, rakdver at gcc dot gnu dot org wrote:

>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11248&action=view)
> Patch to speed up update_ssa
> 
Fails building libgcc with checking disabled on x86.

Starting program: /notnfs/dnovillo/BLD-gcc-native/gcc/cc1 -fpreprocessed
libgcov.i -quiet -dumpbase libgcov.c -mtune=generic -auxbase-strip
libgcc/./_gcov.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
- -Wmissing-prototypes -Wold-style-definition -version -fPIC -o libgcov.s
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xbffff000
GNU C version 4.2.0 20060412 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.1.0 20060304 (Red Hat 4.1.0-3).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128991
Compiler executable checksum: 3c4ee7023c10209f81749c69d1323e23

Program received signal SIGSEGV, Segmentation fault.
0x0813d8f4 in bitmap_first_set_bit (a=0x86ec974)
    at /home/dnovillo/gcc/src/gcc/bitmap.c:595
595       bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS;
(gdb) up
#1  0x080da1da in set_livein_block (var=0xb7ce9034, bb=0xb7cc0d20)
    at /home/dnovillo/gcc/src/gcc/tree-into-ssa.c:486
486           int def_block_index = bitmap_first_set_bit (db_p->def_blocks);
(gdb) up
#2  0x080ddd3b in mark_use_interesting (var=0xb7ce9034, stmt=0xb7cd8f50,
    bb=0xb7cc0d20, blocks=0x86ec8c0, insert_phi_p=1 '\001')
    at /home/dnovillo/gcc/src/gcc/tree-into-ssa.c:1924
1924            set_livein_block (var, bb);
(gdb)
#3  0x080dde71 in prepare_use_sites_for (name=0xb7ce9034, blocks=0x86ec8c0,
    insert_phi_p=1 '\001') at
/home/dnovillo/gcc/src/gcc/tree-into-ssa.c:2045
2045              mark_use_interesting (name, stmt, bb, blocks,
insert_phi_p);
(gdb)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEPQooUTa2oAUaiwQRAkAIAKCE4Sy7b0HCuZXv2M6a0OP0EBrQWgCgg5CT
7er5u0KdZhzL7y6sHsLVZts=
=B10i
-----END PGP SIGNATURE-----


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (33 preceding siblings ...)
  2006-04-12 14:09 ` dnovillo at redhat dot com
@ 2006-04-12 14:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
  2006-04-12 14:24 ` dnovillo at redhat dot com
                   ` (4 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at atrey dot karlin dot mff dot cuni dot cz @ 2006-04-12 14:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #35 from rakdver at atrey dot karlin dot mff dot cuni dot cz  2006-04-12 14:20 -------
Subject: Re:  [4.2 Regression] Repeated SSA update during loop header copying

> >  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11248&action=view)
> > Patch to speed up update_ssa
> > 
> Fails building libgcc with checking disabled on x86.

forgot to say: mostly untested patch, still work in progress :-)


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (34 preceding siblings ...)
  2006-04-12 14:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
@ 2006-04-12 14:24 ` dnovillo at redhat dot com
  2006-04-14  0:06 ` rakdver at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: dnovillo at redhat dot com @ 2006-04-12 14:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #36 from dnovillo at redhat dot com  2006-04-12 14:23 -------
Subject: Re:  [4.2 Regression] Repeated SSA update
 during loop header copying

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/06 10:20, rakdver at atrey dot karlin dot mff dot cuni dot cz
wrote:

> forgot to say: mostly untested patch, still work in progress :-)
> 
Oh, OK.  I got the impression you were submitting it.  I'll wait for
your final version then.  Thanks.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEPQ1sUTa2oAUaiwQRApY5AJ4v+ve2Yl2mkv8+nMVSo0XvOBEF0wCeOLKr
aojItQJu1BeKQcMIwzfLKSM=
=5Ole
-----END PGP SIGNATURE-----


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (35 preceding siblings ...)
  2006-04-12 14:24 ` dnovillo at redhat dot com
@ 2006-04-14  0:06 ` rakdver at gcc dot gnu dot org
  2006-05-15 18:25 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-04-14  0:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #37 from rakdver at gcc dot gnu dot org  2006-04-14 00:06 -------
Created an attachment (id=11262)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11262&action=view)
Updated version of the patch

This patch (this time more or less a final version, bootstrapped & regtested on
ia64) basically solves the problem with incremental updates (see the timings
below -- on x86_64 with disabled checking, on a bit smaller testcase that does
not eat all the memory on the machine).  I will cut it into several parts and
start submitting it.

Timings without the patch:

 tree SSA rewrite      :  94.74 (52%) usr   0.02 ( 1%) sys  94.97 (35%) wall  
11245 kB ( 3%) ggc
 tree SSA incremental  :  29.04 (16%) usr   0.01 ( 0%) sys  28.85 (11%) wall   
5045 kB ( 1%) ggc
 dominance frontiers   :   5.26 ( 3%) usr   0.01 ( 0%) sys   5.32 ( 2%) wall   
   0 kB ( 0%) ggc
 TOTAL                 : 183.92             2.71           268.10            
350366 kB

Timings with the patch:

 tree SSA rewrite      :   2.42 ( 4%) usr   0.01 ( 0%) sys   2.26 ( 1%) wall  
11247 kB ( 3%) ggc
 tree SSA incremental  :   3.79 ( 6%) usr   0.04 ( 1%) sys   4.01 ( 2%) wall   
5754 kB ( 2%) ggc
 dominance frontiers   :   1.35 ( 2%) usr   0.00 ( 0%) sys   1.26 ( 1%) wall   
   0 kB ( 0%) ggc
 TOTAL                 :  64.84             3.13           175.84            
351069 kB


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #11248|0                           |1
        is obsolete|                            |


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (36 preceding siblings ...)
  2006-04-14  0:06 ` rakdver at gcc dot gnu dot org
@ 2006-05-15 18:25 ` rakdver at gcc dot gnu dot org
  2006-05-15 21:56 ` rakdver at gcc dot gnu dot org
  2006-05-30  6:20 ` bonzini at gnu dot org
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-05-15 18:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #38 from rakdver at gcc dot gnu dot org  2006-05-15 18:25 -------
Subject: Bug 26830

Author: rakdver
Date: Mon May 15 18:24:55 2006
New Revision: 113799

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113799
Log:
        PR tree-optimization/26830
        * tree-into-ssa.c (struct ssa_name_info): Add age field.
        (info_for_ssa_name, current_info_for_ssa_name_age,
        blocks_to_update): New variables.
        (get_ssa_name_ann): Use info_for_ssa_name instead of SSA_NAME_AUX.
        (clear_ssa_name_info, initialize_flags_in_bb,
        mark_block_for_update): New functions.
        (mark_def_sites, rewrite_stmt): Assert that blocks_to_update is NULL.
        (insert_phi_nodes_for, mark_use_interesting, prepare_block_for_update,
        prepare_def_site_for): Use mark_block_for_update.
        (mark_def_interesting): Assert that the processed block is marked in
        blocks_to_update.  Do not take blocks argument.
        (prepare_use_sites_for, prepare_names_to_update): Do not take blocks
        argument.
        (rewrite_update_init_block, rewrite_update_stmt): Only process
        blocks with statements to rewrite.
        (delete_update_ssa): Do not clear SSA_NAME_AUX.
        (update_ssa): Initialize and free blocks_to_update.  Do not
        clear flags on statements.  Do not use blocks bitmap.
        * tree.h (SSA_NAME_AUX): Removed.
        (struct tree_ssa_name): Removed aux field.
        * print-tree.c (print_node): Do not print SSA_NAME_AUX.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/print-tree.c
    trunk/gcc/tree-into-ssa.c
    trunk/gcc/tree.h


-- 


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (37 preceding siblings ...)
  2006-05-15 18:25 ` rakdver at gcc dot gnu dot org
@ 2006-05-15 21:56 ` rakdver at gcc dot gnu dot org
  2006-05-30  6:20 ` bonzini at gnu dot org
  39 siblings, 0 replies; 41+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-05-15 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #39 from rakdver at gcc dot gnu dot org  2006-05-15 21:56 -------
Most of the time is now spent in global alloc (30% of wall time) and rtl loop
invariant motion (also about 30%).  Almost all the time of rtl lim is in df
analysis.


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zadeck at naturalbridge dot
                   |                            |com


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


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

* [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying
  2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
                   ` (38 preceding siblings ...)
  2006-05-15 21:56 ` rakdver at gcc dot gnu dot org
@ 2006-05-30  6:20 ` bonzini at gnu dot org
  39 siblings, 0 replies; 41+ messages in thread
From: bonzini at gnu dot org @ 2006-05-30  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #40 from bonzini at gnu dot org  2006-05-30 06:20 -------
We're on par with 4.0, we can close this now.  The memory hog bug (27004) is
still open.


-- 

bonzini at gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-05-30  6:20 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-23 16:45 [Bug tree-optimization/26830] New: Insane amount of compile-time / memory needed at -O1 and up rguenth at gcc dot gnu dot org
2006-03-23 16:48 ` [Bug tree-optimization/26830] " rguenth at gcc dot gnu dot org
2006-03-23 16:56 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] " rguenth at gcc dot gnu dot org
2006-03-23 17:29 ` rguenth at gcc dot gnu dot org
2006-03-23 17:36 ` rguenth at gcc dot gnu dot org
2006-03-23 21:03 ` rguenth at gcc dot gnu dot org
2006-03-23 21:15 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed by into-ssa rguenth at gcc dot gnu dot org
2006-03-23 21:37 ` [Bug tree-optimization/26830] [4.1/4.2 Regression] Insane amount of compile-time / memory needed at -O1 and above rguenth at gcc dot gnu dot org
2006-03-23 22:09 ` rguenth at gcc dot gnu dot org
2006-03-24  8:43 ` rguenth at gcc dot gnu dot org
2006-03-24 14:15 ` bonzini at gnu dot org
2006-03-24 14:16 ` bonzini at gnu dot org
2006-03-24 14:16 ` bonzini at gnu dot org
2006-03-24 15:42 ` bonzini at gnu dot org
2006-03-24 15:50 ` rguenth at gcc dot gnu dot org
2006-03-24 16:07 ` bonzini at gnu dot org
2006-03-24 16:27 ` rguenth at gcc dot gnu dot org
2006-03-24 16:33 ` rguenth at gcc dot gnu dot org
2006-03-27  7:22 ` bonzini at gnu dot org
2006-03-27  7:37 ` bonzini at gnu dot org
2006-03-30  9:17 ` bonzini at gnu dot org
2006-03-30 14:04 ` bonzini at gnu dot org
2006-03-30 14:31 ` bonzini at gcc dot gnu dot org
2006-03-30 15:50 ` rguenth at gcc dot gnu dot org
2006-03-31  7:37 ` paolo dot bonzini at lu dot unisi dot ch
2006-04-03 13:37 ` bonzini at gcc dot gnu dot org
2006-04-03 13:40 ` [Bug tree-optimization/26830] [4.2 Regression] Repeated SSA update during loop header copying bonzini at gnu dot org
2006-04-03 14:16 ` rakdver at gcc dot gnu dot org
2006-04-03 16:20 ` rguenth at gcc dot gnu dot org
2006-04-03 16:31 ` rakdver at gcc dot gnu dot org
2006-04-04  9:21 ` bonzini at gnu dot org
2006-04-04 10:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2006-04-04 14:29 ` bonzini at gnu dot org
2006-04-12 12:20 ` rakdver at gcc dot gnu dot org
2006-04-12 14:09 ` dnovillo at redhat dot com
2006-04-12 14:20 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2006-04-12 14:24 ` dnovillo at redhat dot com
2006-04-14  0:06 ` rakdver at gcc dot gnu dot org
2006-05-15 18:25 ` rakdver at gcc dot gnu dot org
2006-05-15 21:56 ` rakdver at gcc dot gnu dot org
2006-05-30  6:20 ` bonzini at gnu dot org

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