diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-23 15:27:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-23 15:27:33 +0000 |
commit | 40be2320a3646ff02c2caa7459eaccdce2b5c2f4 (patch) | |
tree | ea8d0ee2d60a45012614cd8b419e733902d4bfca | |
parent | b08cd5843569977ca1c079e1dd269a55fdaa2995 (diff) | |
download | gcc-40be2320a3646ff02c2caa7459eaccdce2b5c2f4.tar.gz |
* flow.c (try_simplify_condjump): Unlink insn chain on
fallthru edge; use can_fallthru.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44268 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/flow.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5de1093c069..642408d7876 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 23 17:20:18 CEST 2001 Jan Hubicka <jh@suse.cz> + + * flow.c (try_simplify_condjump): Unlink insn chain on + fallthru edge; use can_fallthru. + Mon Jul 23 16:03:19 CEST 2001 Jan Hubicka <jh@suse.cz> * basic-block.h (find_sub_basic_block): Declare. diff --git a/gcc/flow.c b/gcc/flow.c index ac5cee53eed..12712f26a83 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3056,7 +3056,8 @@ try_simplify_condjump (cbranch_block) /* The conditional branch must target the block after the unconditional branch. */ cbranch_dest_block = cbranch_jump_edge->dest; - if (cbranch_dest_block->index != jump_block->index + 1) + + if (!can_fallthru (jump_block, cbranch_dest_block)) return false; /* Invert the conditional branch. Prevent jump.c from deleting @@ -3079,6 +3080,10 @@ try_simplify_condjump (cbranch_block) cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU; flow_delete_block (jump_block); + /* Selectively unlink the sequence. */ + if (cbranch_jump_edge->src->end != PREV_INSN (cbranch_jump_edge->dest->head)) + flow_delete_insn_chain (NEXT_INSN (cbranch_jump_edge->src->end), + PREV_INSN (cbranch_jump_edge->dest->head)); return true; } |