OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / see.c
index 7a35161..c6f584c 100644 (file)
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -2508,7 +2508,7 @@ see_def_extension_not_merged (struct see_ref_s *curr_ref_s, rtx def_se)
   d.to = new_pseudo_reg;
   note_uses (&PATTERN (ref_copy), see_replace_src, &d);
   /* Step b: Replace every instance of dest_reg with the subreg.  */
-  ref_copy = replace_rtx (ref_copy, dest_reg, subreg);
+  ref_copy = replace_rtx (ref_copy, dest_reg, copy_rtx (subreg));
 
   /* Step c: Replace every use of the new pseudo register back to
      dest_real_reg.  */
@@ -3649,9 +3649,9 @@ see_update_defs_relevancy (rtx insn, struct df_ref *ref,
 
    The information of the u'th use is stored in use_entry[u] and the
    information of the d'th definition is stored in def_entry[d].
-   
+
    Currently all the uses are relevant for the optimization except for
-   uses that are in LIBCALL instructions.  */
+   uses that are in LIBCALL or RETVAL instructions.  */
 
 static void
 see_update_relevancy (void)
@@ -3676,13 +3676,12 @@ see_update_relevancy (void)
          unsigned int uid = INSN_UID (insn);
          if (INSN_P (insn))
            {
-             
-             /* If this is an insn in a libcall, do not touch the uses.  */
-             if (find_reg_note (insn, REG_LIBCALL_ID, NULL_RTX))
+             if (find_reg_note (insn, REG_LIBCALL, NULL_RTX)
+                 || find_reg_note (insn, REG_RETVAL, NULL_RTX))
                et = NOT_RELEVANT;
              else
                et = RELEVANT_USE;
-             
+
              for (use_rec = DF_INSN_UID_USES (uid); *use_rec; use_rec++)
                {
                  struct df_ref *use = *use_rec;
@@ -3860,8 +3859,10 @@ rest_of_handle_see (void)
   return 0;
 }
 
-struct tree_opt_pass pass_see =
+struct rtl_opt_pass pass_see =
 {
+ {
+  RTL_PASS,
   "see",                               /* name */
   gate_handle_see,                     /* gate */
   rest_of_handle_see,                  /* execute */
@@ -3874,8 +3875,8 @@ struct tree_opt_pass pass_see =
   0,                                   /* properties_destroyed */
   0,                                   /* todo_flags_start */
   TODO_df_verify |
-  TODO_df_finish |
-  TODO_dump_func,                      /* todo_flags_finish */
-  'u'                                  /* letter */
+  TODO_df_finish | TODO_verify_rtl_sharing |
+  TODO_dump_func                       /* todo_flags_finish */
+ }
 };