]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
combine.c (distribute_notes): Don't bother REG_WAS_0.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 1 Jul 2003 01:15:07 +0000 (01:15 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 1 Jul 2003 01:15:07 +0000 (01:15 +0000)
* combine.c (distribute_notes): Don't bother REG_WAS_0.
* cse.c (cse_insn): Likewise.
* final.c (final_scan_insn): Likewise.
* jump.c (duplicate_loop_exit_test): Likewise.
* rtl.c (reg_note_name): Remove REG_WAS_0.
* rtl.h (REG_WAS_0): Remove.
* unroll.c (final_reg_note_copy): Don't bother REG_WAS_0.
* config/avr/avr.c (output_movqi): Don't use reg_was_0.
(output_movhi): Likewise.
(output_movsisf): Likewise.
(reg_was_0): Remove.
* config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't use
REG_WAS_0.
(m68hc11_gen_movqi): Likewise.
* config/vax/vax-protos.h: Remove the prototype for
reg_was_0_p.
* config/vax/vax.c (follows_p): Remove.
(reg_was_0_p): Likewise.
* config/vax/vax.md (movsi): Don't use reg_was_0_p.
(movhi): Likewise.
(movqi): Likewise.
* doc/rtl.texi (REG_WAS_0): Remove.

From-SVN: r68753

14 files changed:
gcc/ChangeLog
gcc/combine.c
gcc/config/avr/avr.c
gcc/config/m68hc11/m68hc11.c
gcc/config/vax/vax-protos.h
gcc/config/vax/vax.c
gcc/config/vax/vax.md
gcc/cse.c
gcc/doc/rtl.texi
gcc/final.c
gcc/jump.c
gcc/rtl.c
gcc/rtl.h
gcc/unroll.c

index 3147843b8a17c0611709ab4a2d461940b7edfa2c..a17e655b34a693ab541326d4a3eb6743cd271675 100644 (file)
@@ -1,3 +1,28 @@
+2003-06-30  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * combine.c (distribute_notes): Don't bother REG_WAS_0.
+       * cse.c (cse_insn): Likewise.
+       * final.c (final_scan_insn): Likewise.
+       * jump.c (duplicate_loop_exit_test): Likewise.
+       * rtl.c (reg_note_name): Remove REG_WAS_0.
+       * rtl.h (REG_WAS_0): Remove.
+       * unroll.c (final_reg_note_copy): Don't bother REG_WAS_0.
+       * config/avr/avr.c (output_movqi): Don't use reg_was_0.
+       (output_movhi): Likewise.
+       (output_movsisf): Likewise.
+       (reg_was_0): Remove.
+       * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't use
+       REG_WAS_0.
+       (m68hc11_gen_movqi): Likewise.
+       * config/vax/vax-protos.h: Remove the prototype for
+       reg_was_0_p.
+       * config/vax/vax.c (follows_p): Remove.
+       (reg_was_0_p): Likewise.
+       * config/vax/vax.md (movsi): Don't use reg_was_0_p.
+       (movhi): Likewise.
+       (movqi): Likewise.
+       * doc/rtl.texi (REG_WAS_0): Remove.
+
 2003-06-30  Mark Mitchell  <mark@codesourcery.com>
 
        * config/rs6000/spe.h (__ev_set_spefscr_frmc): Set the flag.
index 7b8fc9c8eb38176b6f1e1aeb2a2659028db765c5..b0d21c0fad1f55abdb0c719e2fddb36e663debe2 100644 (file)
@@ -12605,8 +12605,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2)
          break;
 
        case REG_NONNEG:
-       case REG_WAS_0:
-         /* These notes say something about the value of a register prior
+         /* This note says something about the value of a register prior
             to the execution of an insn.  It is too much trouble to see
             if the note is still correct in all situations.  It is better
             to simply delete it.  */
index 4294d4e63010d623cbb3695ef231f410713c7e1e..432dd538ae6c68cb7de39e27784d1a93d57a8ac8 100644 (file)
@@ -58,7 +58,6 @@ static int    out_adj_frame_ptr    PARAMS ((FILE *, int));
 static int    out_set_stack_ptr    PARAMS ((FILE *, int, int));
 static RTX_CODE compare_condition  PARAMS ((rtx insn));
 static int    compare_sign_p       PARAMS ((rtx insn));
-static int    reg_was_0            PARAMS ((rtx insn, rtx op));
 static tree   avr_handle_progmem_attribute PARAMS ((tree *, tree, tree, int, bool *));
 static tree   avr_handle_fndecl_attribute PARAMS ((tree *, tree, tree, int, bool *));
 const struct attribute_spec avr_attribute_table[];
@@ -1612,9 +1611,6 @@ output_movqi (insn, operands, l)
                return AS1 (clr,%0);
              else if (src == const1_rtx)
                {
-                 if (reg_was_0 (insn, dest))
-                   return AS1 (inc,%0 ; reg_was_0);
-
                  *l = 2;
                  return (AS1 (clr,%0) CR_TAB
                          AS1 (inc,%0));
@@ -1622,9 +1618,6 @@ output_movqi (insn, operands, l)
              else if (src == constm1_rtx)
                {
                  /* Immediate constants -1 to any register */
-                 if (reg_was_0 (insn, dest))
-                   return AS1 (dec,%0 ; reg_was_0);
-
                  *l = 2;
                  return (AS1 (clr,%0) CR_TAB
                          AS1 (dec,%0));
@@ -1635,19 +1628,10 @@ output_movqi (insn, operands, l)
 
                  if (bit_nr >= 0)
                    {
-                     if (reg_was_0 (insn, dest))
-                       {
-                         *l = 2;
-                         if (!real_l)
-                           output_asm_insn ("set ; reg_was_0", operands);
-                       }
-                     else
-                       {
-                         *l = 3;
-                         if (!real_l)
-                           output_asm_insn ((AS1 (clr,%0) CR_TAB
-                                             "set"), operands);
-                       }
+                     *l = 3;
+                     if (!real_l)
+                       output_asm_insn ((AS1 (clr,%0) CR_TAB
+                                         "set"), operands);
                      if (!real_l)
                        avr_output_bld (operands, bit_nr);
 
@@ -1753,13 +1737,6 @@ output_movhi (insn, operands, l)
        {
          if (test_hard_reg_class (LD_REGS, dest)) /* ldi d,i */
            {
-             if (byte_immediate_operand (src, HImode)
-                 && reg_was_0 (insn, dest))
-               {
-                 *l = 1;
-                 return (AS2 (ldi,%A0,lo8(%1) ; reg_was_0));
-               }
-
              *l = 2;
              return (AS2 (ldi,%A0,lo8(%1)) CR_TAB
                      AS2 (ldi,%B0,hi8(%1)));
@@ -1775,12 +1752,6 @@ output_movhi (insn, operands, l)
                }
              else if (src == const1_rtx)
                {
-                 if (reg_was_0 (insn, dest))
-                   {
-                     *l = 1;
-                     return AS1 (inc,%0 ; reg_was_0);
-                   }
-
                  *l = 3;
                  return (AS1 (clr,%A0) CR_TAB
                          AS1 (clr,%B0) CR_TAB
@@ -1789,13 +1760,6 @@ output_movhi (insn, operands, l)
              else if (src == constm1_rtx)
                {
                  /* Immediate constants -1 to any register */
-                 if (reg_was_0 (insn, dest))
-                   {
-                     *l = 2;
-                     return (AS1 (dec,%A0 ; reg_was_0) CR_TAB
-                             AS1 (dec,%B0));
-                   }
-
                  *l = 3;
                  return (AS1 (clr,%0)  CR_TAB
                          AS1 (dec,%A0) CR_TAB
@@ -1807,20 +1771,11 @@ output_movhi (insn, operands, l)
 
                  if (bit_nr >= 0)
                    {
-                     if (reg_was_0 (insn, dest))
-                       {
-                         *l = 2;
-                         if (!real_l)
-                           output_asm_insn ("set ; reg_was_0", operands);
-                       }
-                     else
-                       {
-                         *l = 4;
-                         if (!real_l)
-                           output_asm_insn ((AS1 (clr,%A0) CR_TAB
-                                             AS1 (clr,%B0) CR_TAB
-                                             "set"), operands);
-                       }
+                     *l = 4;
+                     if (!real_l)
+                       output_asm_insn ((AS1 (clr,%A0) CR_TAB
+                                         AS1 (clr,%B0) CR_TAB
+                                         "set"), operands);
                      if (!real_l)
                        avr_output_bld (operands, bit_nr);
 
@@ -2452,13 +2407,6 @@ output_movsisf(insn, operands, l)
        {
          if (test_hard_reg_class (LD_REGS, dest)) /* ldi d,i */
            {
-             if (byte_immediate_operand (src, SImode)
-                 && reg_was_0 (insn, dest))
-               {
-                 *l = 1;
-                 return (AS2 (ldi,%A0,lo8(%1) ; reg_was_0));
-               }
-
              *l = 4;
              return (AS2 (ldi,%A0,lo8(%1))  CR_TAB
                      AS2 (ldi,%B0,hi8(%1))  CR_TAB
@@ -2484,11 +2432,6 @@ output_movsisf(insn, operands, l)
                }
              else if (src == const1_rtx)
                {
-                 if (reg_was_0 (insn, dest))
-                   {
-                     *l = 1;
-                     return AS1 (inc,%A0 ; reg_was_0);
-                   }
                  if (!real_l)
                    output_asm_insn (clr_op0, operands);
                  *l = AVR_ENHANCED ? 4 : 5;
@@ -2497,21 +2440,6 @@ output_movsisf(insn, operands, l)
              else if (src == constm1_rtx)
                {
                  /* Immediate constants -1 to any register */
-                 if (reg_was_0 (insn, dest))
-                   {
-                     if (AVR_ENHANCED)
-                       {
-                         *l = 3;
-                         return (AS1 (dec,%A0) CR_TAB
-                                 AS1 (dec,%B0) CR_TAB
-                                 AS2 (movw,%C0,%A0));
-                       }
-                     *l = 4;
-                     return (AS1 (dec,%D0 ; reg_was_0) CR_TAB
-                             AS1 (dec,%C0)             CR_TAB
-                             AS1 (dec,%B0)             CR_TAB
-                             AS1 (dec,%A0));
-                   }
                  if (AVR_ENHANCED)
                    {
                      *l = 4;
@@ -2533,20 +2461,11 @@ output_movsisf(insn, operands, l)
 
                  if (bit_nr >= 0)
                    {
-                     if (reg_was_0 (insn, dest))
-                       {
-                         *l = 2;
-                         if (!real_l)
-                           output_asm_insn ("set ; reg_was_0", operands);
-                       }
-                     else
+                     *l = AVR_ENHANCED ? 5 : 6;
+                     if (!real_l)
                        {
-                         *l = AVR_ENHANCED ? 5 : 6;
-                         if (!real_l)
-                           {
-                             output_asm_insn (clr_op0, operands);
-                             output_asm_insn ("set", operands);
-                           }
+                         output_asm_insn (clr_op0, operands);
+                         output_asm_insn ("set", operands);
                        }
                      if (!real_l)
                        avr_output_bld (operands, bit_nr);
@@ -5401,25 +5320,6 @@ avr_hard_regno_mode_ok (regno, mode)
   return !(regno & 1);
 }
 
-/* Returns 1 if we know register operand OP was 0 before INSN.  */
-
-static int
-reg_was_0 (insn, op)
-     rtx insn;
-     rtx op;
-{
-  rtx link;
-  return (optimize > 0 && insn && op && REG_P (op)
-         && (link = find_reg_note (insn, REG_WAS_0, 0))
-         /* Make sure the insn that stored the 0 is still present.  */
-         && ! INSN_DELETED_P (XEXP (link, 0))
-         && GET_CODE (XEXP (link, 0)) != NOTE
-         /* Make sure cross jumping didn't happen here.  */
-         && no_labels_between_p (XEXP (link, 0), insn)
-         /* Make sure the reg hasn't been clobbered.  */
-         && ! reg_set_between_p (op, XEXP (link, 0), insn));
-}
-
 /* Returns 1 if X is a valid address for an I/O register of size SIZE
    (1 or 2).  Used for lds/sts -> in/out optimization.  Add 0x20 to SIZE
    to check for the lower half of I/O space (for cbi/sbi/sbic/sbis).  */
index 58e884549e2699d4fea03e25a0c5807cc1ffe2fa..7fc3a6412f79895a7147c89deb49444f4120d678 100644 (file)
@@ -3295,17 +3295,6 @@ m68hc11_gen_movhi (insn, operands)
        {
          if (SP_REG_P (operands[0]))
            output_asm_insn ("lds\t%1", operands);
-         else if (0 /* REG_WAS_0 note is boggus;  don't rely on it.  */
-                   && !D_REG_P (operands[0])
-                   && GET_CODE (operands[1]) == CONST_INT
-                   && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)
-                   && find_reg_note (insn, REG_WAS_0, 0))
-            {
-              if (INTVAL (operands[1]) == 1)
-                output_asm_insn ("in%0", operands);
-              else
-                output_asm_insn ("de%0", operands);
-            }
          else
            output_asm_insn ("ld%0\t%1", operands);
        }
@@ -3489,16 +3478,6 @@ m68hc11_gen_movhi (insn, operands)
              cc_status = cc_prev_status;
              output_asm_insn ("tsx", operands);
            }
-         else if (0 /* REG_WAS_0 note is boggus;  don't rely on it.  */
-                   && GET_CODE (operands[1]) == CONST_INT
-                   && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)
-                   && find_reg_note (insn, REG_WAS_0, 0))
-            {
-              if (INTVAL (operands[1]) == 1)
-                output_asm_insn ("in%0", operands);
-              else
-                output_asm_insn ("de%0", operands);
-            }
          else
            {
              output_asm_insn ("ldx\t%1", operands);
@@ -3547,16 +3526,6 @@ m68hc11_gen_movhi (insn, operands)
              cc_status = cc_prev_status;
              output_asm_insn ("tsy", operands);
            }
-         else if (0 /* REG_WAS_0 note is boggus;  don't rely on it.  */
-                   && GET_CODE (operands[1]) == CONST_INT
-                   && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)
-                   && find_reg_note (insn, REG_WAS_0, 0))
-            {
-              if (INTVAL (operands[1]) == 1)
-                output_asm_insn ("in%0", operands);
-              else
-                output_asm_insn ("de%0", operands);
-            }
           else
            {
              output_asm_insn ("ldy\t%1", operands);
@@ -3797,16 +3766,6 @@ m68hc11_gen_movqi (insn, operands)
                  output_asm_insn ("ldab\t%T0", operands);
                }
            }
-         else if (0 /* REG_WAS_0 note is boggus;  don't rely on it.  */
-                   && GET_CODE (operands[1]) == CONST_INT
-                   && (INTVAL (operands[1]) == 1 || INTVAL (operands[1]) == -1)
-                   && find_reg_note (insn, REG_WAS_0, 0))
-            {
-              if (INTVAL (operands[1]) == 1)
-                output_asm_insn ("inc%b0", operands);
-              else
-                output_asm_insn ("dec%b0", operands);
-            }          
          else if (!DB_REG_P (operands[1]) && !D_REG_P (operands[1])
                   && !DA_REG_P (operands[1]))
            {
index 8da42d0d02755bf6a5f71bc4e6217ae3982f82b9..199db19af55cd2c710861d15780d07525ec05128 100644 (file)
@@ -25,7 +25,6 @@ extern const char *rev_cond_name PARAMS ((rtx));
 extern void split_quadword_operands PARAMS ((rtx *, rtx *, int));
 extern void print_operand_address PARAMS ((FILE *, rtx));
 extern int vax_float_literal PARAMS ((rtx));
-extern int reg_was_0_p PARAMS ((rtx, rtx));
 #endif /* RTX_CODE */
 
 #ifdef REAL_VALUE_TYPE
index fea970e0eda621618b3355f61b53ad4b0eeb7c48..1b94beef01dd172e62c8c6c5a9e501c0fb1d0fc8 100644 (file)
@@ -41,7 +41,6 @@ Boston, MA 02111-1307, USA.  */
 #include "target.h"
 #include "target-def.h"
 
-static int follows_p PARAMS ((rtx, rtx));
 static void vax_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void vax_file_start PARAMS ((void));
 static void vax_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
@@ -755,41 +754,6 @@ vax_rtx_costs (x, code, outer_code, total)
   return true;
 }
 \f
-/* Return 1 if insn A follows B.  */
-
-static int
-follows_p (a, b)
-     rtx a, b;
-{
-  register rtx p;
-
-  for (p = a; p != b; p = NEXT_INSN (p))
-    if (! p)
-      return 1;
-
-  return 0;
-}
-
-/* Returns 1 if we know operand OP was 0 before INSN.  */
-
-int
-reg_was_0_p (insn, op)
-     rtx insn, op;
-{
-  rtx link;
-
-  return ((link = find_reg_note (insn, REG_WAS_0, 0))
-         /* Make sure the insn that stored the 0 is still present
-            and doesn't follow INSN in the insn sequence.  */
-         && ! INSN_DELETED_P (XEXP (link, 0))
-         && GET_CODE (XEXP (link, 0)) != NOTE
-         && ! follows_p (XEXP (link, 0), insn)
-         /* Make sure cross jumping didn't happen here.  */
-         && no_labels_between_p (XEXP (link, 0), insn)
-         /* Make sure the reg hasn't been clobbered.  */
-         && ! reg_set_between_p (op, XEXP (link, 0), insn));
-}
-
 /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
    Used for C++ multiple inheritance.
        .mask   ^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>  #conservative entry mask
index d0dc955602183d721d8b0a4fac97096fdc41a6eb..7027604ed9e0984b36ad623c869940f9266d7416 100644 (file)
   ""
   "*
 {
-  if (operands[1] == const1_rtx && reg_was_0_p (insn, operands[0]))
-    return \"incl %0\";
-
   if (GET_CODE (operands[1]) == SYMBOL_REF || GET_CODE (operands[1]) == CONST)
     {
       if (push_operand (operands[0], SImode))
   ""
   "*
 {
-  if (operands[1] == const1_rtx && reg_was_0_p (insn, operands[0]))
-    return \"incw %0\";
-
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       int i = INTVAL (operands[1]);
   ""
   "*
 {
-  if (operands[1] == const1_rtx && reg_was_0_p (insn, operands[0]))
-    return \"incb %0\";
-
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       int i = INTVAL (operands[1]);
index f01c81201694b3657e2857c5d8328c35e36c4c49..5e6c9e40b17e3a2b2bc7da42d55298df75ce2896 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5598,41 +5598,6 @@ cse_insn (rtx insn, rtx libcall_insn)
                 making a new one if one does not already exist.  */
              set_unique_reg_note (insn, REG_EQUAL, src_const);
            }
-
-         /* If storing a constant value in a register that
-            previously held the constant value 0,
-            record this fact with a REG_WAS_0 note on this insn.
-
-            Note that the *register* is required to have previously held 0,
-            not just any register in the quantity and we must point to the
-            insn that set that register to zero.
-
-            Rather than track each register individually, we just see if
-            the last set for this quantity was for this register.  */
-
-         if (REGNO_QTY_VALID_P (REGNO (dest)))
-           {
-             int dest_q = REG_QTY (REGNO (dest));
-             struct qty_table_elem *dest_ent = &qty_table[dest_q];
-
-             if (dest_ent->const_rtx == const0_rtx)
-               {
-                 /* See if we previously had a REG_WAS_0 note.  */
-                 rtx note = find_reg_note (insn, REG_WAS_0, NULL_RTX);
-                 rtx const_insn = dest_ent->const_insn;
-
-                 if ((tem = single_set (const_insn)) != 0
-                     && rtx_equal_p (SET_DEST (tem), dest))
-                   {
-                     if (note)
-                       XEXP (note, 0) = const_insn;
-                     else
-                       REG_NOTES (insn)
-                         = gen_rtx_INSN_LIST (REG_WAS_0, const_insn,
-                                              REG_NOTES (insn));
-                   }
-               }
-           }
        }
 
       /* Now deal with the destination.  */
@@ -6238,20 +6203,6 @@ cse_insn (rtx insn, rtx libcall_insn)
              validate_change (insn, &SET_SRC (sets[0].rtl), dest, 1);
              apply_change_group ();
 
-             /* If there was a REG_WAS_0 note on PREV, remove it.  Move
-                any REG_WAS_0 note on INSN to PREV.  */
-             note = find_reg_note (prev, REG_WAS_0, NULL_RTX);
-             if (note)
-               remove_note (prev, note);
-
-             note = find_reg_note (insn, REG_WAS_0, NULL_RTX);
-             if (note)
-               {
-                 remove_note (insn, note);
-                 XEXP (note, 1) = REG_NOTES (prev);
-                 REG_NOTES (prev) = note;
-               }
-
              /* If INSN has a REG_EQUAL note, and this note mentions
                 REG0, then we must delete it, because the value in
                 REG0 has changed.  If the note's value is REG1, we must
index a0c655576224b9414b1c7e5d15df6bdcc81ee18b..ca3c2de9700abce186e7861796fef0767446e841 100644 (file)
@@ -3354,13 +3354,6 @@ destination register.
 Thus, compiler passes prior to register allocation need only check for
 @code{REG_EQUAL} notes and passes subsequent to register allocation
 need only check for @code{REG_EQUIV} notes.
-
-@findex REG_WAS_0
-@item REG_WAS_0
-The single output of this insn contained zero before this insn.
-@var{op} is the insn that set it to zero.  You can rely on this note if
-it is present and @var{op} has not been deleted or turned into a @code{note};
-its absence implies nothing.
 @end table
 
 These notes describe linkages between insns.  They occur in pairs: one
index a86249f0440fb9f782bef59064664c5137ece38b..5ce81afa145dec287edd42f193e43139b7341fb7 100644 (file)
@@ -2503,9 +2503,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
 #endif
 
 #if 0
-       /* It's not at all clear why we did this and doing so interferes
-          with tests we'd like to do to use REG_WAS_0 notes, so let's try
-          with this out.  */
+       /* It's not at all clear why we did this and doing so used to
+          interfere with tests that used REG_WAS_0 notes, which are
+          now gone, so let's try with this out.  */
 
        /* Mark this insn as having been output.  */
        INSN_DELETED_P (insn) = 1;
index 08ae377274e9b103d8e78f1ae53a25618cfedde7..693e274093145121b1e07caf5d8a35ed067c89c1 100644 (file)
@@ -357,10 +357,6 @@ duplicate_loop_exit_test (loop_start)
          break;
        case JUMP_INSN:
        case INSN:
-         /* The code below would grossly mishandle REG_WAS_0 notes,
-            so get rid of them here.  */
-         while ((p = find_reg_note (insn, REG_WAS_0, NULL_RTX)) != 0)
-           remove_note (insn, p);
          if (++num_insns > 20
              || find_reg_note (insn, REG_RETVAL, NULL_RTX)
              || find_reg_note (insn, REG_LIBCALL, NULL_RTX))
index 8e1176d4127a78953c32e3c3a4d797653c595d1d..852b8ca18627fdbd448bf4924e122630ae200add 100644 (file)
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -225,7 +225,7 @@ const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS] =
 const char * const reg_note_name[] =
 {
   "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_EQUAL",
-  "REG_WAS_0", "REG_RETVAL", "REG_LIBCALL", "REG_NONNEG",
+  "REG_RETVAL", "REG_LIBCALL", "REG_NONNEG",
   "REG_NO_CONFLICT", "REG_UNUSED", "REG_CC_SETTER", "REG_CC_USER",
   "REG_LABEL", "REG_DEP_ANTI", "REG_DEP_OUTPUT", "REG_BR_PROB",
   "REG_NOALIAS", "REG_SAVE_AREA", "REG_BR_PRED",
index 6255639bdad170d53855b6434d96a71e9d2ac69a..bba530181ba08828e61526497eeceee1e4128ef3 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -633,12 +633,6 @@ enum reg_note
      but it can be used for cse.  */
   REG_EQUAL,
 
-  /* The register set in this insn held 0 before the insn.  The contents of
-     the note is the insn that stored the 0.  If that insn is deleted or
-     patched to a NOTE, the REG_WAS_0 is inoperative.  The REG_WAS_0 note
-     is actually an INSN_LIST, not an EXPR_LIST.  */
-  REG_WAS_0,
-
   /* This insn copies the return-value of a library call out of the hard reg
      for return values.  This note is actually an INSN_LIST and it points to
      the first insn involved in setting up arguments for the call.  flow.c
index 03decb773dfc10c34edf57026e777353c651b916..84ace299e4ee8c1c50a3be05697ed7bbc9c524ea 100644 (file)
@@ -1735,29 +1735,18 @@ final_reg_note_copy (notesp, map)
 
       if (GET_CODE (note) == INSN_LIST)
        {
-         /* Sometimes, we have a REG_WAS_0 note that points to a
-            deleted instruction.  In that case, we can just delete the
-            note.  */
-         if (REG_NOTE_KIND (note) == REG_WAS_0)
+         rtx insn = map->insn_map[INSN_UID (XEXP (note, 0))];
+
+         /* If we failed to remap the note, something is awry.
+            Allow REG_LABEL as it may reference label outside
+            the unrolled loop.  */
+         if (!insn)
            {
-             *notesp = XEXP (note, 1);
-             continue;
+             if (REG_NOTE_KIND (note) != REG_LABEL)
+               abort ();
            }
          else
-           {
-             rtx insn = map->insn_map[INSN_UID (XEXP (note, 0))];
-
-             /* If we failed to remap the note, something is awry.
-                Allow REG_LABEL as it may reference label outside
-                the unrolled loop.  */
-             if (!insn)
-               {
-                 if (REG_NOTE_KIND (note) != REG_LABEL)
-                   abort ();
-               }
-             else
-               XEXP (note, 0) = insn;
-           }
+           XEXP (note, 0) = insn;
        }
 
       notesp = &XEXP (note, 1);