diff options
author | Roger Sayle <roger@eyesopen.com> | 2005-01-08 14:47:56 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2005-01-08 14:47:56 +0000 |
commit | 88c0f1c63f152af3577ed3a99f37db01995bd22d (patch) | |
tree | 6fa5bb4ea1832b1bc0f31bb3af40958fe981dd75 /gcc | |
parent | 779fae71d577b160100b76e507cdadd7bb94f7ad (diff) | |
download | gcc-88c0f1c63f152af3577ed3a99f37db01995bd22d.zip gcc-88c0f1c63f152af3577ed3a99f37db01995bd22d.tar.gz gcc-88c0f1c63f152af3577ed3a99f37db01995bd22d.tar.bz2 |
ifcvt.c (find_if_case_1): Reinstate 2005-01-04 change...
* ifcvt.c (find_if_case_1): Reinstate 2005-01-04 change, now that
the latent bug in rtl_delete_block has been resolved.
From-SVN: r93085
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ifcvt.c | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4da603..efe3238 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-01-08 Roger Sayle <roger@eyesopen.com> + + * ifcvt.c (find_if_case_1): Reinstate 2005-01-04 change, now that + the latent bug in rtl_delete_block has been resolved. + 2005-01-08 Richard Sandiford <rsandifo@redhat.com> * config/mips/t-iris6 (MULTILIB_DIRNAMES): Use -mabi argument values. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 98fbd66..5eea041 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2927,7 +2927,22 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge) else_bb->global_live_at_start, then_bb->global_live_at_end); - new_bb = redirect_edge_and_branch_force (FALLTHRU_EDGE (test_bb), else_bb); + + /* We can avoid creating a new basic block if then_bb is immediately + followed by else_bb, i.e. deleting then_bb allows test_bb to fall + thru to else_bb. */ + + if (then_bb->next_bb == else_bb + && then_bb->prev_bb == test_bb + && else_bb != EXIT_BLOCK_PTR) + { + redirect_edge_succ (FALLTHRU_EDGE (test_bb), else_bb); + new_bb = 0; + } + else + new_bb = redirect_edge_and_branch_force (FALLTHRU_EDGE (test_bb), + else_bb); + then_bb_index = then_bb->index; delete_basic_block (then_bb); |