diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-08 11:53:25 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-08 11:53:25 +0000 |
commit | b73edd22fdbdef327dff73be8ba6c107cac135bd (patch) | |
tree | 586c2008cb2ba82b8fde6b577fb903af06659acd /gcc/sel-sched.c | |
parent | a8d6ade370f2755c35c18aeaa9a713c1beb6a6a8 (diff) | |
download | gcc-b73edd22fdbdef327dff73be8ba6c107cac135bd.tar.gz |
PR rtl-optimization/48302
* sel-sched-ir.h (sel_add_loop_preheaders): Update prototype.
* sel-sched-ir.c (sel_add_loop_preheaders): Add 'bbs' argument. Use
it to record added preheader blocks.
* sel-sched.c (setup_current_loop_nest): Add 'bbs' argument. Pass it
on to sel_add_loop_preheaders.
(sel_region_init): Move call to setup_current_loop_nest after
sel_init_bbs.
testsuite:
* g++.dg/opt/pr48302.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched.c')
-rw-r--r-- | gcc/sel-sched.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index fb1a026bf28..48fb2e0134d 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -6801,7 +6801,7 @@ current_region_empty_p (void) /* Prepare and verify loop nest for pipelining. */ static void -setup_current_loop_nest (int rgn) +setup_current_loop_nest (int rgn, bb_vec_t *bbs) { current_loop_nest = get_loop_nest_for_rgn (rgn); @@ -6810,7 +6810,7 @@ setup_current_loop_nest (int rgn) /* If this loop has any saved loop preheaders from nested loops, add these basic blocks to the current region. */ - sel_add_loop_preheaders (); + sel_add_loop_preheaders (bbs); /* Check that we're starting with a valid information. */ gcc_assert (loop_latch_edge (current_loop_nest)); @@ -6849,9 +6849,6 @@ sel_region_init (int rgn) if (current_region_empty_p ()) return true; - if (flag_sel_sched_pipelining) - setup_current_loop_nest (rgn); - sel_setup_region_sched_flags (); bbs = VEC_alloc (basic_block, heap, current_nr_blocks); @@ -6861,6 +6858,9 @@ sel_region_init (int rgn) sel_init_bbs (bbs, NULL); + if (flag_sel_sched_pipelining) + setup_current_loop_nest (rgn, &bbs); + /* Initialize luids and dependence analysis which both sel-sched and haifa need. */ sched_init_luids (bbs, NULL, NULL, NULL); |