summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-07 02:43:04 +0000
committerkan <kan@FreeBSD.org>2003-11-07 02:43:04 +0000
commitb09448931ae541a7a60fd1cf0ebac14b627fba69 (patch)
tree980c917e2cc50183c4d566d9a0f9a1c818e6a6cd /contrib/gcc/cfgcleanup.c
parentdc227ec3ae9a56f16c472206f51e4838bb53a644 (diff)
downloadFreeBSD-src-b09448931ae541a7a60fd1cf0ebac14b627fba69.zip
FreeBSD-src-b09448931ae541a7a60fd1cf0ebac14b627fba69.tar.gz
Gcc 3.3.3 20031106.
Diffstat (limited to 'contrib/gcc/cfgcleanup.c')
-rw-r--r--contrib/gcc/cfgcleanup.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/gcc/cfgcleanup.c b/contrib/gcc/cfgcleanup.c
index 008c8da..df914ec 100644
--- a/contrib/gcc/cfgcleanup.c
+++ b/contrib/gcc/cfgcleanup.c
@@ -125,6 +125,8 @@ try_simplify_condjump (cbranch_block)
basic_block jump_block, jump_dest_block, cbranch_dest_block;
edge cbranch_jump_edge, cbranch_fallthru_edge;
rtx cbranch_insn;
+ rtx insn, next;
+ rtx end;
/* Verify that there are exactly two successors. */
if (!cbranch_block->succ
@@ -177,6 +179,26 @@ try_simplify_condjump (cbranch_block)
cbranch_fallthru_edge->flags &= ~EDGE_FALLTHRU;
update_br_prob_note (cbranch_block);
+ end = jump_block->end;
+ /* Deleting a block may produce unreachable code warning even when we are
+ not deleting anything live. Supress it by moving all the line number
+ notes out of the block. */
+ for (insn = jump_block->head; insn != NEXT_INSN (jump_block->end);
+ insn = next)
+ {
+ next = NEXT_INSN (insn);
+ if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
+ {
+ if (insn == jump_block->end)
+ {
+ jump_block->end = PREV_INSN (insn);
+ if (insn == end)
+ break;
+ }
+ reorder_insns_nobb (insn, insn, end);
+ end = insn;
+ }
+ }
/* Delete the block with the unconditional jump, and clean up the mess. */
flow_delete_block (jump_block);
tidy_fallthru_edge (cbranch_jump_edge, cbranch_block, cbranch_dest_block);
OpenPOWER on IntegriCloud