]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
loop.c (add_label_notes): Do not ignore references to labels before dispatch tables.
authorJeffrey A Law <law@cygnus.com>
Sat, 15 Aug 1998 00:32:21 +0000 (00:32 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 15 Aug 1998 00:32:21 +0000 (18:32 -0600)
        * 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.
Fixes abort building XEmacs on x86.

From-SVN: r21743

gcc/ChangeLog
gcc/gcse.c
gcc/loop.c

index 93711ed4ee0571b4ef43945e7c98c773cb7fde3a..819acb64c754e9e17f041d0f9fbff78e3be66265 100644 (file)
@@ -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.
index af354691cf1ef8bbe76755d2c2c5963261887603..b51754aa26a184144d749967e271f8bb870975d3 100644 (file)
@@ -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;
     }
 
index 7e2c4d1d220bce7f3f99b52a1210901cc2dabc1d..3af6750de26ae1bbc34885bab3e12d58a9a734a9 100644 (file)
@@ -1614,22 +1614,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);