diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-08 10:11:09 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-08 10:11:09 +0000 |
commit | 6195c0dd4e15f50ac89491b48e050751f8231304 (patch) | |
tree | 1f49de2cfcd902f18c22b5539315d7b0fb4db972 /gcc/sel-sched-ir.c | |
parent | d7ce7f9586bca838e0dcc7e39100ffe6edcd74f3 (diff) | |
download | gcc-6195c0dd4e15f50ac89491b48e050751f8231304.tar.gz |
2012-03-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk [future 4.8] rev 185094 using svnmerge
2011-03-08 Basile Starynkevitch <basile@starynkevitch.net>
[gcc/]
* melt-build.tpl (meltframe.args): Add -Iinclude-fixed if it exists.
* melt-build.mk: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@185096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r-- | gcc/sel-sched-ir.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index a93cd68d1a3..c53d2e1a8e9 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -3658,7 +3658,7 @@ sel_recompute_toporder (void) static bool maybe_tidy_empty_bb (basic_block bb) { - basic_block succ_bb, pred_bb; + basic_block succ_bb, pred_bb, note_bb; VEC (basic_block, heap) *dom_bbs; edge e; edge_iterator ei; @@ -3697,6 +3697,17 @@ maybe_tidy_empty_bb (basic_block bb) pred_bb = NULL; dom_bbs = NULL; + /* Save a pred/succ from the current region to attach the notes to. */ + note_bb = NULL; + FOR_EACH_EDGE (e, ei, bb->preds) + if (in_current_region_p (e->src)) + { + note_bb = e->src; + break; + } + if (note_bb == NULL) + note_bb = succ_bb; + /* Redirect all non-fallthru edges to the next bb. */ while (rescan_p) { @@ -3746,10 +3757,8 @@ maybe_tidy_empty_bb (basic_block bb) else { /* This is a block without fallthru predecessor. Just delete it. */ - gcc_assert (pred_bb != NULL); - - if (in_current_region_p (pred_bb)) - move_bb_info (pred_bb, bb); + gcc_assert (note_bb); + move_bb_info (note_bb, bb); remove_empty_bb (bb, true); } @@ -5231,10 +5240,9 @@ sel_remove_bb (basic_block bb, bool remove_from_cfg_p) static void move_bb_info (basic_block merge_bb, basic_block empty_bb) { - gcc_assert (in_current_region_p (merge_bb)); - - concat_note_lists (BB_NOTE_LIST (empty_bb), - &BB_NOTE_LIST (merge_bb)); + if (in_current_region_p (merge_bb)) + concat_note_lists (BB_NOTE_LIST (empty_bb), + &BB_NOTE_LIST (merge_bb)); BB_NOTE_LIST (empty_bb) = NULL_RTX; } |