diff mbox

[committed] sel-sched: Fixup adding of preheader blocks from inner loops

Message ID alpine.LNX.2.00.1104081811070.17990@monoid.intra.ispras.ru
State New
Headers show

Commit Message

Alexander Monakov April 8, 2011, 2:22 p.m. UTC
I failed to notice that current_loop_nest is modified in
setup_current_loop_nest and used in sel_setup_region_sched_flags.  Therefore,
sel_setup_region_sched_flags should be moved with setup_current_loop_nest
after sel_init_bbs as well.

I've committed the following patch under the 'obvious' rule after noticing the
problem on ia64 bootstrap with selective scheduler enabled at -O2 (I normally
do this together with amd64 bootstraps before committing patches, but this
time I made a typo that completely disabled sel-sched for ia64 testing).
Sorry for the noise.

2011-04-08  Alexander Monakov  <amonakov@ispras.ru>

        * sel-sched.c (sel_region_init): Move call to
        sel_setup_region_sched_flags after setup_current_loop_nest.
diff mbox

Patch

Index: gcc/sel-sched.c
===================================================================
--- gcc/sel-sched.c	(revision 172177)
+++ gcc/sel-sched.c	(working copy)
@@ -6868,8 +6868,6 @@  sel_region_init (int rgn)
   if (current_region_empty_p ())
     return true;
 
-  sel_setup_region_sched_flags ();
-
   bbs = VEC_alloc (basic_block, heap, current_nr_blocks);
 
   for (i = 0; i < current_nr_blocks; i++)
@@ -6880,6 +6878,8 @@  sel_region_init (int rgn)
   if (flag_sel_sched_pipelining)
     setup_current_loop_nest (rgn, &bbs);
 
+  sel_setup_region_sched_flags ();
+
   /* Initialize luids and dependence analysis which both sel-sched and haifa
      need.  */
   sched_init_luids (bbs, NULL, NULL, NULL);