OSDN Git Service

2007-02-13 Paul Brook <paul@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / fwprop.c
index 887da70..1ab3e52 100644 (file)
@@ -691,9 +691,10 @@ try_fwprop_subst (struct df_ref *use, rtx *loc, rtx new, rtx def_insn, bool set_
          if (dump_file)
            fprintf (dump_file, " Setting REG_EQUAL note\n");
 
-         REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, copy_rtx (new),
-                                               REG_NOTES (insn));
+         set_unique_reg_note (insn, REG_EQUAL, copy_rtx (new));
 
+         /* ??? Is this still necessary if we add the note through
+            set_unique_reg_note?  */
           if (!CONSTANT_P (new))
            update_df (insn, loc, DF_INSN_USES (df, def_insn),
                       type, DF_REF_IN_NOTE);
@@ -846,6 +847,8 @@ forward_propagate_into (struct df_ref *use)
 
   if (DF_REF_FLAGS (use) & DF_REF_READ_WRITE)
     return;
+  if (DF_REF_FLAGS (use) & DF_REF_ARTIFICIAL)
+    return;
 
   /* Only consider uses that have a single definition.  */
   defs = DF_REF_CHAIN (use);
@@ -855,6 +858,8 @@ forward_propagate_into (struct df_ref *use)
   def = defs->ref;
   if (DF_REF_FLAGS (def) & DF_REF_READ_WRITE)
     return;
+  if (DF_REF_FLAGS (def) & DF_REF_ARTIFICIAL)
+    return;
 
   /* Do not propagate loop invariant definitions inside the loop if
      we are going to unroll.  */
@@ -899,7 +904,7 @@ fwprop_init (void)
 
   /* Now set up the dataflow problem (we only want use-def chains) and
      put the dataflow solver to work.  */
-  df = df_init (DF_SUBREGS | DF_EQUIV_NOTES);
+  df = df_init (DF_HARD_REGS | DF_SUBREGS | DF_EQUIV_NOTES);
   df_chain_add_problem (df, DF_UD_CHAIN);
   df_analyze (df);
   df_dump (df, dump_file);