mirror of
https://review.haiku-os.org/buildtools
synced 2025-02-23 06:07:41 +01:00
[taken from gcc-2.95.3-latest-cvs]
2001-03-28 Bernd Schmidt <bernds@redhat.com> * jump.c (jump_optimize_1): Move call to delete_barrier_successors to a point where JUMP_LABELS and LABEL_NUSES are set up properly. (delete_barrier_successors): If deleting a table jump, delete the case vector as well. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9594 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
48228ca39b
commit
da36187c7a
@ -200,8 +200,6 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
|
|||||||
if (flag_exceptions && cross_jump)
|
if (flag_exceptions && cross_jump)
|
||||||
init_insn_eh_region (f, max_uid);
|
init_insn_eh_region (f, max_uid);
|
||||||
|
|
||||||
delete_barrier_successors (f);
|
|
||||||
|
|
||||||
/* Leave some extra room for labels and duplicate exit test insns
|
/* Leave some extra room for labels and duplicate exit test insns
|
||||||
we make. */
|
we make. */
|
||||||
max_jump_chain = max_uid * 14 / 10;
|
max_jump_chain = max_uid * 14 / 10;
|
||||||
@ -224,6 +222,8 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan, mark_labels_only)
|
|||||||
for (insn = exception_handler_labels; insn; insn = XEXP (insn, 1))
|
for (insn = exception_handler_labels; insn; insn = XEXP (insn, 1))
|
||||||
LABEL_NUSES (XEXP (insn, 0))++;
|
LABEL_NUSES (XEXP (insn, 0))++;
|
||||||
|
|
||||||
|
delete_barrier_successors (f);
|
||||||
|
|
||||||
/* Quit now if we just wanted to rebuild the JUMP_LABEL and REG_LABEL
|
/* Quit now if we just wanted to rebuild the JUMP_LABEL and REG_LABEL
|
||||||
notes and recompute LABEL_NUSES. */
|
notes and recompute LABEL_NUSES. */
|
||||||
if (mark_labels_only)
|
if (mark_labels_only)
|
||||||
@ -2139,7 +2139,24 @@ delete_barrier_successors (f)
|
|||||||
insn = NEXT_INSN (insn);
|
insn = NEXT_INSN (insn);
|
||||||
while (insn != 0 && GET_CODE (insn) != CODE_LABEL)
|
while (insn != 0 && GET_CODE (insn) != CODE_LABEL)
|
||||||
{
|
{
|
||||||
if (GET_CODE (insn) == NOTE
|
if (GET_CODE (insn) == JUMP_INSN)
|
||||||
|
{
|
||||||
|
/* Detect when we're deleting a tablejump; get rid of
|
||||||
|
the jump table as well. */
|
||||||
|
rtx next1 = next_nonnote_insn (insn);
|
||||||
|
rtx next2 = next1 ? next_nonnote_insn (next1) : 0;
|
||||||
|
if (next2 && GET_CODE (next1) == CODE_LABEL
|
||||||
|
&& GET_CODE (next2) == JUMP_INSN
|
||||||
|
&& (GET_CODE (PATTERN (next2)) == ADDR_VEC
|
||||||
|
|| GET_CODE (PATTERN (next2)) == ADDR_DIFF_VEC))
|
||||||
|
{
|
||||||
|
delete_insn (insn);
|
||||||
|
insn = next2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
insn = delete_insn (insn);
|
||||||
|
}
|
||||||
|
else if (GET_CODE (insn) == NOTE
|
||||||
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_FUNCTION_END)
|
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_FUNCTION_END)
|
||||||
insn = NEXT_INSN (insn);
|
insn = NEXT_INSN (insn);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user