Commit e105f02c by Jeffrey A Law Committed by Jeff Law

jump.c (mark_jump_label): Record REG_LABEL notes for insns which refer to the…

jump.c (mark_jump_label): Record REG_LABEL notes for insns which refer to the CODE_LABEL before a...

        * jump.c (mark_jump_label): Record REG_LABEL notes for insns which
        refer to the CODE_LABEL before a dispatch table.

From-SVN: r19060
parent 56b2d7a7
...@@ -23,6 +23,9 @@ Fri Apr 3 17:02:13 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> ...@@ -23,6 +23,9 @@ Fri Apr 3 17:02:13 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
Wed Apr 8 12:51:19 1998 Jeffrey A Law (law@cygnus.com) Wed Apr 8 12:51:19 1998 Jeffrey A Law (law@cygnus.com)
* jump.c (mark_jump_label): Record REG_LABEL notes for insns which
refer to the CODE_LABEL before a dispatch table.
* invoke.texi: Add ARC options. * invoke.texi: Add ARC options.
* gcc.c (proces_command): Improve error message for -o with * gcc.c (proces_command): Improve error message for -o with
......
...@@ -3397,17 +3397,21 @@ mark_jump_label (x, insn, cross_jump) ...@@ -3397,17 +3397,21 @@ mark_jump_label (x, insn, cross_jump)
is one. */ is one. */
else if (! find_reg_note (insn, REG_LABEL, label)) else if (! find_reg_note (insn, REG_LABEL, label))
{ {
rtx next = next_real_insn (label); /* This code used to ignore labels which refered to dispatch
/* Don't record labels that refer to dispatch tables. tables to avoid flow.c generating worse code.
This is not necessary, since the tablejump
references the same label. However, in the presense of global optimizations like
And if we did record them, flow.c would make worse code. */ gcse which call find_basic_blocks without calling
if (next == 0 life_analysis, not recording such labels will lead
|| ! (GET_CODE (next) == JUMP_INSN to compiler aborts because of inconsistencies in the
&& (GET_CODE (PATTERN (next)) == ADDR_VEC flow graph. So we go ahead and record the label.
|| GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)))
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, label, It may also be the case that the optimization argument
REG_NOTES (insn)); is no longer valid because of the more accurate cfg
we build in find_basic_blocks -- it no longer pessimizes
code when it finds a REG_LABEL note. */
REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, label,
REG_NOTES (insn));
} }
} }
return; return;
......
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