]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alpha.md, [...]: Always use set_unique_reg_note to add REG_EQUAL notes.
authorSteven Bosscher <steven@gcc.gnu.org>
Tue, 2 Jan 2007 18:50:33 +0000 (18:50 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Tue, 2 Jan 2007 18:50:33 +0000 (18:50 +0000)
        * config/alpha/alpha.md, arm/arm.c, darwin.c, frv/frv.md,
        m32r/m32r.c, m32r/m32r.c, mn10300/mn10300.md, pa/pa.c,
        rs6000/rs6000.c, s390/s390.md, sh/sh.md, sparc/sparc.c:
        Always use set_unique_reg_note to add REG_EQUAL notes.

From-SVN: r120353

13 files changed:
gcc/ChangeLog
gcc/config/alpha/alpha.md
gcc/config/arm/arm.c
gcc/config/darwin.c
gcc/config/frv/frv.md
gcc/config/m32r/m32r.c
gcc/config/mn10300/mn10300.md
gcc/config/pa/pa.c
gcc/config/rs6000/rs6000.c
gcc/config/s390/s390.md
gcc/config/sh/sh.md
gcc/config/sparc/sparc.c
gcc/tree-nested.c

index 9406b46185adf9c3cad7c6a58347895df6644b84..e7e62e9caf3b94e8d96b77639be00d45b2e3e543 100644 (file)
@@ -1,3 +1,10 @@
+2007-01-02  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * config/alpha/alpha.md, arm/arm.c, darwin.c, frv/frv.md,
+       m32r/m32r.c, m32r/m32r.c, mn10300/mn10300.md, pa/pa.c,
+       rs6000/rs6000.c, s390/s390.md, sh/sh.md, sparc/sparc.c:
+       Always use set_unique_reg_note to add REG_EQUAL notes.
+
 2007-01-02  Kazu Hirata  <kazu@codesourcery.com>
 
        Revert:
index 2838499fa86dfcc9cccb920c5fad5aea91639318..f49b0dc10f5afb1b08d0251747d8189d224f716b 100644 (file)
   emit_insn (gen_ashldi3 (operands[0], operands[0], GEN_INT (32)));
   insn2 = emit_insn (gen_umk_lalm (operands[0], operands[0], operands[1]));
   insn3 = emit_insn (gen_umk_lal (operands[0], operands[0], operands[1]));
-  REG_NOTES (insn3) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                        REG_NOTES (insn3));
+  set_unique_reg_note (insn3, REG_EQUAL, operands[1]);
+
   if (GET_CODE (operands[1]) == LABEL_REF)
     {
       rtx label;
index c7bf05fc4e4ed935439a1d942a0c166f4b8062f4..c7a1ec28eca9c7a2c8bc7f6a0d52f480ae2b1ed2 100644 (file)
@@ -3295,8 +3295,8 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
 #endif
       /* Put a REG_EQUAL note on this insn, so that it can be optimized
         by loop.  */
-      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
-                                           REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, orig);
+
       return reg;
     }
   else if (GET_CODE (orig) == CONST)
index 1c7747cc04ce5be983cd5720b55ae1b501b57084..7bd916d907bd496af17d59a9baedc72477421b9b 100644 (file)
@@ -742,8 +742,7 @@ machopic_legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
                                  gen_rtx_LO_SUM (Pmode,
                                                  hi_sum_reg, offset));
              insn = emit_insn (gen_rtx_SET (VOIDmode, reg, mem));
-             REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, pic_ref,
-                                                   REG_NOTES (insn));
+             set_unique_reg_note (insn, REG_EQUAL, pic_ref);
 
              pic_ref = reg;
 #else
index d0f359277592914feb1a1284a6adfe68067c1212..43af8c429323883682588ad2de6bb9807c608449 100644 (file)
 
   MEM_READONLY_P (SET_SRC (PATTERN (insn))) = 1;
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
 {
   rtx insn = emit_insn (gen_symGOTOFF2reg_i (operands[0], operands[1], operands[2], operands[3]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
   insn = emit_insn (gen_symGOTOFF2reg_i (operands[0], operands[1],
                                         operands[4], operands[3]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
   insn = emit_insn (gen_symGOTOFF2reg_hilo (operands[0], operands[1],
                                            operands[4], operands[3]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
index e7e1a2d30247a604a75b448b48e1229a3190deba..a4d20397bc2ddffd2ceef9f3ef9149c7d70ea4c2 100644 (file)
@@ -1681,8 +1681,7 @@ m32r_legitimize_pic_address (rtx orig, rtx reg)
 #if 0
       /* Put a REG_EQUAL note on this insn, so that it can be optimized
          by loop.  */
-      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
-                  REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, orig);
 #endif
       return reg;
     }
index f8f320e03e02a1b65a5053184d8fc095ddfc1232..5c5bc8de5dc213203a3dc1d7efa16a939368e2ad 100644 (file)
 
   MEM_READONLY_P (SET_SRC (PATTERN (insn))) = 1;
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
 {
   rtx insn = emit_insn (gen_symGOTOFF2reg_i (operands[0], operands[1]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
index 29e449d2e2ef289220648b968f47abd849ebdf20..59f9dfd4d32c2567d071359353cc38d880a35ce2 100644 (file)
@@ -662,7 +662,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
       insn = emit_move_insn (reg, pic_ref);
 
       /* Put a REG_EQUAL note on this insn, so that it can be optimized.  */
-      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig, REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, orig);
 
       return reg;
     }
@@ -1978,8 +1978,7 @@ emit_move_sequence (rtx *operands, enum machine_mode mode, rtx scratch_reg)
                }
            }
 
-         REG_NOTES (insn)
-           = gen_rtx_EXPR_LIST (REG_EQUAL, op1, REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, op1);
 
          return 1;
        }
index eaf3db63840eae7de4b1e4f6df7b7db4c7109332..15f263ab01660303c722bacc56193b1e922832ff 100644 (file)
@@ -3363,8 +3363,7 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model model)
                  emit_move_insn (tmp2, mem);
                  emit_insn (gen_addsi3 (tmp3, tmp1, tmp2));
                  last = emit_move_insn (got, tmp3);
-                 REG_NOTES (last) = gen_rtx_EXPR_LIST (REG_EQUAL, gsym,
-                                                       REG_NOTES (last));
+                 set_unique_reg_note (last, REG_EQUAL, gsym);
                  REG_NOTES (first) = gen_rtx_INSN_LIST (REG_LIBCALL, last,
                                                         REG_NOTES (first));
                  REG_NOTES (last) = gen_rtx_INSN_LIST (REG_RETVAL, first,
index 23484098f790fa1402f753de02b78306a69822a8..03bec777bd79979765172b4bd0cde1d0c0cf933b 100644 (file)
   emit_insn (gen_divmodtidi3 (operands[4], operands[1], operands[2]));
 
   insn = emit_move_insn (operands[0], gen_lowpart (DImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, div_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, div_equal);
 
   insn = emit_move_insn (operands[3], gen_highpart (DImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, mod_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, mod_equal);
 
   DONE;
 })
   emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[4]));
   emit_move_insn (gen_lowpart (DImode, operands[4]), operands[1]);
   emit_move_insn (gen_highpart (DImode, operands[4]), const0_rtx);
+
   insn = emit_insn (gen_udivmodtidi3 (operands[4], operands[4], operands[2]));
-  REG_NOTES (insn) =
-       gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, equal);
 
   insn = emit_move_insn (operands[0], gen_lowpart (DImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, div_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, div_equal);
 
   insn = emit_move_insn (operands[3], gen_highpart (DImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, mod_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, mod_equal);
 
   DONE;
 })
 
   operands[4] = gen_reg_rtx(DImode);
   emit_insn (gen_extendsidi2 (operands[4], operands[1]));
+
   insn = emit_insn (gen_divmoddisi3 (operands[4], operands[4], operands[2]));
-  REG_NOTES (insn) =
-       gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, equal);
 
   insn = emit_move_insn (operands[0], gen_lowpart (SImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, div_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, div_equal);
 
   insn = emit_move_insn (operands[3], gen_highpart (SImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, mod_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, mod_equal);
 
   DONE;
 })
   emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[4]));
   emit_move_insn (gen_lowpart (SImode, operands[4]), operands[1]);
   emit_move_insn (gen_highpart (SImode, operands[4]), const0_rtx);
+
   insn = emit_insn (gen_udivmoddisi3 (operands[4], operands[4], operands[2]));
-  REG_NOTES (insn) =
-       gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, equal);
 
   insn = emit_move_insn (operands[0], gen_lowpart (SImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, div_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, div_equal);
 
   insn = emit_move_insn (operands[3], gen_highpart (SImode, operands[4]));
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, mod_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, mod_equal);
 
   DONE;
 })
          emit_insn (gen_zero_extendsidi2 (operands[3], operands[1]));
          insn = emit_insn (gen_divmoddisi3 (operands[3], operands[3],
                                             operands[2]));
-         REG_NOTES (insn) =
-           gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, equal);
 
          insn = emit_move_insn (operands[0],
                                 gen_lowpart (SImode, operands[3]));
-         REG_NOTES (insn) =
-           gen_rtx_EXPR_LIST (REG_EQUAL,
-                              udiv_equal, REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, udiv_equal);
         }
     }
   else
       emit_insn (gen_zero_extendsidi2 (operands[3], operands[1]));
       insn = emit_insn (gen_divmoddisi3 (operands[3], operands[3],
                                         operands[2]));
-      REG_NOTES (insn) =
-      gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, equal);
 
       insn = emit_move_insn (operands[0],
                             gen_lowpart (SImode, operands[3]));
-      REG_NOTES (insn) =
-      gen_rtx_EXPR_LIST (REG_EQUAL,
-                              udiv_equal, REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, udiv_equal);
+
       emit_jump (label3);
       emit_label (label1);
       emit_move_insn (operands[0], operands[1]);
          emit_insn (gen_zero_extendsidi2 (operands[3], operands[1]));
          insn = emit_insn (gen_divmoddisi3 (operands[3], operands[3],
                                             operands[2]));
-         REG_NOTES (insn) =
-           gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, equal);
 
          insn = emit_move_insn (operands[0],
                                 gen_highpart (SImode, operands[3]));
-         REG_NOTES (insn) =
-           gen_rtx_EXPR_LIST (REG_EQUAL,
-                              umod_equal, REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, umod_equal);
         }
     }
   else
       emit_insn (gen_zero_extendsidi2 (operands[3], operands[1]));
       insn = emit_insn (gen_divmoddisi3 (operands[3], operands[3],
                                         operands[2]));
-      REG_NOTES (insn) =
-      gen_rtx_EXPR_LIST (REG_EQUAL, equal, REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, equal);
 
       insn = emit_move_insn (operands[0],
                             gen_highpart (SImode, operands[3]));
-      REG_NOTES (insn) =
-      gen_rtx_EXPR_LIST (REG_EQUAL,
-                        umod_equal, REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, umod_equal);
+
       emit_jump (label3);
       emit_label (label1);
       emit_move_insn (operands[0], const0_rtx);
   emit_insn (gen_clztidi2 (wide_reg, operands[1], msb));
 
   insn = emit_move_insn (operands[0], gen_highpart (DImode, wide_reg));  
-  REG_NOTES (insn) =
-        gen_rtx_EXPR_LIST (REG_EQUAL, clz_equal, REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, clz_equal);
 
   DONE;
 })
index e6d80300cddf7e9aa34b3d5780265ebd55ff21be..0186ba5b30e4fab0f390255987ec5c3bc29093e4 100644 (file)
@@ -2749,9 +2749,9 @@ label:
      See also smulsi3_highpart.
      ??? Alternatively, we could put this at the calling site of expand_binop,
      i.e. expand_expr.  */
-  REG_NOTES (last)
-    = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))),
-                        REG_NOTES (last));
+  set_unique_reg_note (last, REG_EQUAL,
+                      copy_rtx (SET_SRC (single_set (first))));
+
   DONE;
 }")
 
@@ -2779,9 +2779,9 @@ label:
      See also smulsi3_highpart.
      ??? Alternatively, we could put this at the calling site of expand_binop,
      i.e. expand_expr.  */
-  REG_NOTES (last)
-    = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))),
-                        REG_NOTES (last));
+  set_unique_reg_note (last, REG_EQUAL,
+                      copy_rtx (SET_SRC (single_set (first))));
+
   DONE;
 }")
 
@@ -3058,9 +3058,9 @@ label:
      See also {,u}mulhisi.
      ??? Alternatively, we could put this at the calling site of expand_binop,
      i.e. expand_mult_highpart.  */
-  REG_NOTES (last)
-    = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (SET_SRC (single_set (first))),
-                        REG_NOTES (last));
+  set_unique_reg_note (last, REG_EQUAL,
+                      copy_rtx (SET_SRC (single_set (first))));
+
   DONE;
 }")
 
@@ -5113,8 +5113,7 @@ label:
 {
   rtx insn = emit_insn (gen_movsi_const (operands[0], operands[1]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (operands[1]),
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, copy_rtx (operands[1]));
 
   DONE;
 }")
@@ -5497,8 +5496,7 @@ label:
   else
     insn = emit_insn (gen_movdi_const_32bit (operands[0], operands[1]));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (operands[1]),
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, copy_rtx (operands[1]));
 
   DONE;
 }")
@@ -8323,8 +8321,7 @@ label:
 
       insn = emit_move_insn (operands[0], tr);
 
-      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, equiv,
-                                           REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, equiv);
 
       DONE;
     }
@@ -8433,9 +8430,8 @@ label:
   /* ??? Should we have a special alias set for the GOT?  */
   insn = emit_move_insn (operands[0], mem);
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, XVECEXP (XEXP (operands[1],
-                                                                 0), 0, 0),
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL,
+                      XVECEXP (XEXP (operands[1], 0), 0, 0));
 
   DONE;
 }")
@@ -8494,8 +8490,7 @@ label:
                         gen_rtx_PLUS (Pmode, t,
                                       gen_rtx_REG (Pmode, PIC_REG)));
 
-  REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, operands[1],
-                                       REG_NOTES (insn));
+  set_unique_reg_note (insn, REG_EQUAL, operands[1]);
 
   DONE;
 }")
@@ -13203,9 +13198,8 @@ mov.l\\t1f,r0\\n\\
   emit_insn (gen_adddi3 (scratch, scratch, GEN_INT (-64)));
   emit_insn (gen_movdicc_false (scratch, operands[1], const0_rtx, scratch));
   last = emit_insn (gen_subdi3 (operands[0], const0_rtx, scratch));
-  REG_NOTES (last)
-    = gen_rtx_EXPR_LIST (REG_EQUAL,
-                        gen_rtx_FFS (DImode, operands[0]), REG_NOTES (last));
+  set_unique_reg_note (last, REG_EQUAL, gen_rtx_FFS (DImode, operands[0]));
+
   DONE;
 }")
 
@@ -13228,9 +13222,8 @@ mov.l\\t1f,r0\\n\\
   emit_insn (gen_nsbsi (scratch, discratch));
   last = emit_insn (gen_subsi3 (operands[0],
                                force_reg (SImode, GEN_INT (63)), scratch));
-  REG_NOTES (last)
-    = gen_rtx_EXPR_LIST (REG_EQUAL,
-                        gen_rtx_FFS (SImode, operands[0]), REG_NOTES (last));
+  set_unique_reg_note (last, REG_EQUAL, gen_rtx_FFS (SImode, operands[0]));
+
   DONE;
 }")
 
index 75c7de729e686e348504c1cedd0e7839ac6a3026..05390096b7c833cd1d86fe677778d673d8e6305a 100644 (file)
@@ -3257,8 +3257,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
       insn = emit_move_insn (reg, pic_ref);
       /* Put a REG_EQUAL note on this insn, so that it can be optimized
         by loop.  */
-      REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig,
-                                 REG_NOTES (insn));
+      set_unique_reg_note (insn, REG_EQUAL, orig);
       return reg;
     }
   else if (GET_CODE (orig) == CONST)
index 0b78d0e6e526118b8579a897732c6479902a8cab..fdf39cc4623d651e38ca7299a519eeeff1f40be7 100644 (file)
@@ -183,7 +183,7 @@ build_addr (tree exp, tree context)
   save_context = current_function_decl;
   current_function_decl = context;
   retval = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (exp)), exp);
-  current_function_decl = save_context;;
+  current_function_decl = save_context;
   return retval;
 }