(delete_insn): Delete labels in ADDR_VECs and

ADDR_DIFF_VECs if their use count becomes zero.

From-SVN: r8439
This commit is contained in:
Doug Evans 1994-11-15 15:36:58 +00:00
parent b2a80c0d2b
commit 3c7d7a4a7d

View File

@ -3375,6 +3375,24 @@ delete_insn (insn)
return next;
}
/* Likewise if we're deleting a dispatch table. */
if (GET_CODE (insn) == JUMP_INSN
&& (GET_CODE (PATTERN (insn)) == ADDR_VEC
|| GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC))
{
rtx pat = PATTERN (insn);
int i, diff_vec_p = GET_CODE (pat) == ADDR_DIFF_VEC;
int len = XVECLEN (pat, diff_vec_p);
for (i = 0; i < len; i++)
if (--LABEL_NUSES (XEXP (XVECEXP (pat, diff_vec_p, i), 0)) == 0)
delete_insn (XEXP (XVECEXP (pat, diff_vec_p, i), 0));
while (next && INSN_DELETED_P (next))
next = NEXT_INSN (next);
return next;
}
while (prev && (INSN_DELETED_P (prev) || GET_CODE (prev) == NOTE))
prev = PREV_INSN (prev);