Commit 5bb86bf2 by Jeffrey A Law Committed by Jeff Law

flow.c (propagate_block_delete_insn): Handle deletion of ADDR_VEC and ADDR_DIFF_VEC insns when...


        * flow.c (propagate_block_delete_insn): Handle deletion of ADDR_VEC
        and ADDR_DIFF_VEC insns when the proceeding CODE_LABEL was put
        into the constant pool.
        * jump.c (jump_optimize_1): Remove barrier successors after all
        the LABEL_NUSES counds have been computed.
        (delete_barrier_successors): When deleting a tablejump insn, also
        delete the jump table it uses.
        * varasm.c (force_const_mem): Set LABEL_PRESERVE_P when forcing a
        label into memory.

From-SVN: r41662
parent 3a432f1f
Sat Apr 28 10:36:23 2001 Jeffrey A Law (law@cygnus.com)
* flow.c (propagate_block_delete_insn): Handle deletion of ADDR_VEC
and ADDR_DIFF_VEC insns when the proceeding CODE_LABEL was put
into the constant pool.
* jump.c (jump_optimize_1): Remove barrier successors after all
the LABEL_NUSES counds have been computed.
(delete_barrier_successors): When deleting a tablejump insn, also
delete the jump table it uses.
* varasm.c (force_const_mem): Set LABEL_PRESERVE_P when forcing a
label into memory.
2001-04-28 Martin Kalen <martin.kalen@todaysystems.com.au>
* pa.c (FRP): Remove erroneous white space in macro definition.
......
......@@ -3638,7 +3638,10 @@ propagate_block_delete_insn (bb, insn)
rtx label = XEXP (inote, 0);
rtx next;
if (LABEL_NUSES (label) == 1
/* The label may be forced if it has been put in the constant
pool. If that is the only use we must discard the table
jump following it, but not the label itself. */
if (LABEL_NUSES (label) == 1 + LABEL_PRESERVE_P (label)
&& (next = next_nonnote_insn (label)) != NULL
&& GET_CODE (next) == JUMP_INSN
&& (GET_CODE (PATTERN (next)) == ADDR_VEC
......
......@@ -214,9 +214,6 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
cross_jump_death_matters = (cross_jump == 2);
max_uid = init_label_info (f) + 1;
if (! mark_labels_only)
delete_barrier_successors (f);
/* Leave some extra room for labels and duplicate exit test insns
we make. */
max_jump_chain = max_uid * 14 / 10;
......@@ -239,6 +236,9 @@ jump_optimize_1 (f, cross_jump, noop_moves, after_regscan,
if (GET_CODE (XEXP (insn, 0)) == CODE_LABEL)
LABEL_NUSES (XEXP (insn, 0))++;
if (! mark_labels_only)
delete_barrier_successors (f);
/* Quit now if we just wanted to rebuild the JUMP_LABEL and REG_LABEL
notes and recompute LABEL_NUSES. */
if (mark_labels_only)
......@@ -792,7 +792,24 @@ delete_barrier_successors (f)
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)
insn = NEXT_INSN (insn);
else
......
......@@ -3589,6 +3589,9 @@ force_const_mem (mode, x)
pool_offset += align - 1;
pool_offset &= ~ (align - 1);
if (GET_CODE (x) == LABEL_REF)
LABEL_PRESERVE_P (XEXP (x, 0)) = 1;
/* Allocate a pool constant descriptor, fill it in, and chain it in. */
pool = (struct pool_constant *) ggc_alloc (sizeof (struct pool_constant));
......
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