aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-08-15 00:33:57 +0000
committerJeff Law <law@gcc.gnu.org>1998-08-14 18:33:57 -0600
commit6b3603c2731fd23a7b6444e3515e3a42d60d0894 (patch)
treebc5dda9b52607bdd550eed99e6c8a9594e3b5781
parentfbe83d7ac8de863d96382e114d1bbd3307d803af (diff)
downloadgcc-6b3603c2731fd23a7b6444e3515e3a42d60d0894.zip
gcc-6b3603c2731fd23a7b6444e3515e3a42d60d0894.tar.gz
gcc-6b3603c2731fd23a7b6444e3515e3a42d60d0894.tar.bz2
loop.c (add_label_notes): Do not ignore references to labels before dispatch tables.
* loop.c (add_label_notes): Do not ignore references to labels before dispatch tables. Mirrors Apr 8 change to mark_jump_label. * gcse.c (add_label_notes): Similarly. From-SVN: r21744
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/gcse.c18
-rw-r--r--gcc/loop.c25
3 files changed, 20 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fa2a9aa..d323f6f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
Fri Aug 14 21:07:03 1998 Jeffrey A Law (law@cygnus.com)
+ * loop.c (add_label_notes): Do not ignore references to labels
+ before dispatch tables. Mirrors Apr 8 change to mark_jump_label.
+ * gcse.c (add_label_notes): Similarly.
+
* pa.h (ASM_OUTPUT_MI_THUNK): Strip name encoding.
* m68k.md (adddi_dilshr32): One of the operands must be a register.
diff --git a/gcc/gcse.c b/gcc/gcse.c
index af35469..b51754a 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4733,17 +4733,13 @@ add_label_notes (x, insn)
if (code == LABEL_REF && !LABEL_REF_NONLOCAL_P (x))
{
- rtx next = next_real_insn (XEXP (x, 0));
-
- /* Don't record labels that refer to dispatch tables.
- This is not necessary, since the tablejump references the same label.
- And if we did record them, flow.c would make worse code. */
- if (next == 0
- || ! (GET_CODE (next) == JUMP_INSN
- && (GET_CODE (PATTERN (next)) == ADDR_VEC
- || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)))
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0),
- REG_NOTES (insn));
+ /* This code used to ignore labels that referred to dispatch tables to
+ avoid flow generating (slighly) worse code.
+
+ We no longer ignore such label references (see LABEL_REF handling in
+ mark_jump_label for additional information). */
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0),
+ REG_NOTES (insn));
return;
}
diff --git a/gcc/loop.c b/gcc/loop.c
index c9c9869..c5d1505 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1627,22 +1627,15 @@ add_label_notes (x, insns)
if (code == LABEL_REF && !LABEL_REF_NONLOCAL_P (x))
{
- rtx next = next_real_insn (XEXP (x, 0));
-
- /* Don't record labels that refer to dispatch tables.
- This is not necessary, since the tablejump references the same label.
- And if we did record them, flow.c would make worse code. */
- if (next == 0
- || ! (GET_CODE (next) == JUMP_INSN
- && (GET_CODE (PATTERN (next)) == ADDR_VEC
- || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)))
- {
- for (insn = insns; insn; insn = NEXT_INSN (insn))
- if (reg_mentioned_p (XEXP (x, 0), insn))
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0),
- REG_NOTES (insn));
- }
- return;
+ /* This code used to ignore labels that referred to dispatch tables to
+ avoid flow generating (slighly) worse code.
+
+ We no longer ignore such label references (see LABEL_REF handling in
+ mark_jump_label for additional information). */
+ for (insn = insns; insn; insn = NEXT_INSN (insn))
+ if (reg_mentioned_p (XEXP (x, 0), insn))
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0),
+ REG_NOTES (insn));
}
fmt = GET_RTX_FORMAT (code);