Commit 5b1cacd8 by Jeff Law Committed by Jeff Law

cfgrtl.c (try_redirect_by_replacing_jump): Remove associated CODE_LABEL and jump table when...

        * cfgrtl.c (try_redirect_by_replacing_jump): Remove associated
        CODE_LABEL and jump table when replacing a table jump with a
        simple jump.

From-SVN: r49478
parent 5987ca1c
Mon Feb 4 09:05:58 2002 Jeffrey A Law (law@redhat.com)
* cfgrtl.c (try_redirect_by_replacing_jump): Remove associated
CODE_LABEL and jump table when replacing a table jump with a
simple jump.
2002-02-04 Ulrich Weigand <uweigand@de.ibm.com> 2002-02-04 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390-protos.h (legitimize_la_operand, * config/s390/s390-protos.h (legitimize_la_operand,
......
...@@ -714,7 +714,7 @@ try_redirect_by_replacing_jump (e, target) ...@@ -714,7 +714,7 @@ try_redirect_by_replacing_jump (e, target)
else else
{ {
rtx target_label = block_label (target); rtx target_label = block_label (target);
rtx barrier; rtx barrier, tmp;
emit_jump_insn_after (gen_jump (target_label), insn); emit_jump_insn_after (gen_jump (target_label), insn);
JUMP_LABEL (src->end) = target_label; JUMP_LABEL (src->end) = target_label;
...@@ -723,8 +723,21 @@ try_redirect_by_replacing_jump (e, target) ...@@ -723,8 +723,21 @@ try_redirect_by_replacing_jump (e, target)
fprintf (rtl_dump_file, "Replacing insn %i by jump %i\n", fprintf (rtl_dump_file, "Replacing insn %i by jump %i\n",
INSN_UID (insn), INSN_UID (src->end)); INSN_UID (insn), INSN_UID (src->end));
delete_insn_chain (kill_from, insn); delete_insn_chain (kill_from, insn);
/* Recognize a tablejump that we are converting to a
simple jump and remove its associated CODE_LABEL
and ADDR_VEC or ADDR_DIFF_VEC. */
if ((tmp = JUMP_LABEL (insn)) != NULL_RTX
&& (tmp = NEXT_INSN (tmp)) != NULL_RTX
&& GET_CODE (tmp) == JUMP_INSN
&& (GET_CODE (PATTERN (tmp)) == ADDR_VEC
|| GET_CODE (PATTERN (tmp)) == ADDR_DIFF_VEC))
{
delete_insn_chain (JUMP_LABEL (insn), tmp);
}
barrier = next_nonnote_insn (src->end); barrier = next_nonnote_insn (src->end);
if (!barrier || GET_CODE (barrier) != BARRIER) if (!barrier || GET_CODE (barrier) != BARRIER)
emit_barrier_after (src->end); emit_barrier_after (src->end);
......
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