diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-07 18:36:15 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-07 18:36:15 +0000 |
commit | 459e9193ab2f7d9b7b34dffc1bb1db09773c7028 (patch) | |
tree | b557a9b19a9ed1f213210bf2c9904a6e1079c631 /gcc/flow.c | |
parent | b104a6a7e1cdca6f19acfd5ffef0af297ddf30f1 (diff) | |
download | gcc-459e9193ab2f7d9b7b34dffc1bb1db09773c7028.tar.gz |
* jump.c (onlyjump_p): New function.
* rtl.h: Declare it.
* flow.c (delete_unreachable_blocks): Use onlyjump_p instead
of condjump_p in calling tidy_fallthru_edge and merge_blocks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28584 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index 9ca8f5c88fb..0fbe5517a59 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -1564,11 +1564,9 @@ delete_unreachable_blocks () if ((s = b->succ) != NULL && s->succ_next == NULL && s->dest == c - /* If the last insn is not a normal conditional jump - (or an unconditional jump), then we can not tidy the - fallthru edge because we can not delete the jump. */ - && GET_CODE (b->end) == JUMP_INSN - && condjump_p (b->end)) + /* If the jump insn has side effects, we can't tidy the edge. */ + && (GET_CODE (b->end) != JUMP_INSN + || onlyjump_p (b->end))) tidy_fallthru_edge (s, b, c); } @@ -1587,11 +1585,9 @@ delete_unreachable_blocks () && (s->flags & EDGE_EH) == 0 && (c = s->dest) != EXIT_BLOCK_PTR && c->pred->pred_next == NULL - /* If the last insn is not a normal conditional jump - (or an unconditional jump), then we can not merge - the blocks because we can not delete the jump. */ - && GET_CODE (b->end) == JUMP_INSN - && condjump_p (b->end) + /* If the jump insn has side effects, we can't kill the edge. */ + && (GET_CODE (b->end) != JUMP_INSN + || onlyjump_p (b->end)) && merge_blocks (s, b, c)) continue; |