diff options
author | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-28 10:01:52 +0000 |
---|---|---|
committer | amonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-28 10:01:52 +0000 |
commit | df6266b93bca0b815d599daec16087e220183641 (patch) | |
tree | 49f2c287d751ab49352e33fce6814bbe9a083ce9 /gcc/sel-sched-ir.c | |
parent | a0c9474116d8e5d450630e0dcbcb8574a1d1e3c9 (diff) | |
download | gcc-df6266b93bca0b815d599daec16087e220183641.tar.gz |
gcc/testsuite/Changelog:
2009-04-28 Alexander Monakov <amonakov@ispras.ru>
* gcc.target/ia64/20071210-2.c: New testcase.
gcc/Changelog:
2009-04-28 Alexander Monakov <amonakov@ispras.ru>
* sel-sched-ir.c (maybe_tidy_empty_bb): Do not attempt to delete a
block if there are complex incoming edges.
(sel_merge_blocks): Remove useless assert.
(sel_redirect_edge_and_branch): Check that edge was redirected.
* sel-sched-ir.h (_eligible_successor_edge_p): Remove assert.
(sel_find_rgns): Delete declaration.
* sel-sched.c (purge_empty_blocks): Attempt to remove first block of
the region when it is not a preheader.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146882 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r-- | gcc/sel-sched-ir.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 168b01f64d4..d3f35627815 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -3481,6 +3481,8 @@ bool maybe_tidy_empty_bb (basic_block bb) { basic_block succ_bb, pred_bb; + edge e; + edge_iterator ei; bool rescan_p; /* Keep empty bb only if this block immediately precedes EXIT and @@ -3492,6 +3494,11 @@ maybe_tidy_empty_bb (basic_block bb) || !(single_pred_edge (bb)->flags & EDGE_FALLTHRU)))) return false; + /* Do not attempt to redirect complex edges. */ + FOR_EACH_EDGE (e, ei, bb->preds) + if (e->flags & EDGE_COMPLEX) + return false; + free_data_sets (bb); /* Do not delete BB if it has more than one successor. @@ -3510,9 +3517,6 @@ maybe_tidy_empty_bb (basic_block bb) /* Redirect all non-fallthru edges to the next bb. */ while (rescan_p) { - edge e; - edge_iterator ei; - rescan_p = false; FOR_EACH_EDGE (e, ei, bb->preds) @@ -5244,8 +5248,6 @@ sel_create_recovery_block (insn_t orig_insn) void sel_merge_blocks (basic_block a, basic_block b) { - gcc_assert (can_merge_blocks_p (a, b)); - sel_remove_empty_bb (b, true, false); merge_blocks (a, b); @@ -5290,6 +5292,7 @@ sel_redirect_edge_and_branch (edge e, basic_block to) basic_block src; int prev_max_uid; rtx jump; + edge redirected; latch_edge_p = (pipelining_p && current_loop_nest @@ -5297,9 +5300,10 @@ sel_redirect_edge_and_branch (edge e, basic_block to) src = e->src; prev_max_uid = get_max_uid (); - - redirect_edge_and_branch (e, to); - gcc_assert (last_added_blocks == NULL); + + redirected = redirect_edge_and_branch (e, to); + + gcc_assert (redirected && last_added_blocks == NULL); /* When we've redirected a latch edge, update the header. */ if (latch_edge_p) |