Commit 1fe65930 by Richard Henderson Committed by Jeff Law

* jump.c (delete_insn): Delete the addr_vec when deleting a tablejump.

From-SVN: r28492
parent dbd83e11
Wed Aug 4 02:15:32 1999 Richard Henderson <rth@cygnus.com>
* jump.c (delete_insn): Delete the addr_vec when deleting a tablejump.
Wed Aug 4 01:48:08 1999 Jim Kingdon <http://developer.redhat.com> Wed Aug 4 01:48:08 1999 Jim Kingdon <http://developer.redhat.com>
* global.c: Fix comment. * global.c: Fix comment.
......
...@@ -4017,20 +4017,36 @@ delete_insn (insn) ...@@ -4017,20 +4017,36 @@ delete_insn (insn)
and delete the label if it is now unused. */ and delete the label if it is now unused. */
if (GET_CODE (insn) == JUMP_INSN && JUMP_LABEL (insn)) if (GET_CODE (insn) == JUMP_INSN && JUMP_LABEL (insn))
if (--LABEL_NUSES (JUMP_LABEL (insn)) == 0) {
{ rtx lab = JUMP_LABEL (insn), lab_next;
/* This can delete NEXT or PREV,
either directly if NEXT is JUMP_LABEL (INSN), if (--LABEL_NUSES (lab) == 0)
or indirectly through more levels of jumps. */ {
delete_insn (JUMP_LABEL (insn)); /* This can delete NEXT or PREV,
/* I feel a little doubtful about this loop, either directly if NEXT is JUMP_LABEL (INSN),
but I see no clean and sure alternative way or indirectly through more levels of jumps. */
to find the first insn after INSN that is not now deleted. delete_insn (lab);
I hope this works. */
while (next && INSN_DELETED_P (next)) /* I feel a little doubtful about this loop,
next = NEXT_INSN (next); but I see no clean and sure alternative way
return next; to find the first insn after INSN that is not now deleted.
} I hope this works. */
while (next && INSN_DELETED_P (next))
next = NEXT_INSN (next);
return next;
}
else if ((lab_next = next_nonnote_insn (lab)) != NULL
&& GET_CODE (lab_next) == JUMP_INSN
&& (GET_CODE (PATTERN (lab_next)) == ADDR_VEC
|| GET_CODE (PATTERN (lab_next)) == ADDR_DIFF_VEC))
{
/* If we're deleting the tablejump, delete the dispatch table.
We may not be able to kill the label immediately preceeding
just yet, as it might be referenced in code leading up to
the tablejump. */
delete_insn (lab_next);
}
}
/* Likewise if we're deleting a dispatch table. */ /* Likewise if we're deleting a dispatch table. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment