On Thu, Aug 14, 2014 at 11:34:04AM +0200, Jakub Jelinek wrote:
> So, to set DEP_MULTIPLE even in the case where ask_depencency_caches
> returns DEP_PRESENT, you'd need to find the old dependency anyway (isn't
> that going to be expensive and totally kill all the effects of
> true_dependency_cache?) and set DEP_MULTIPLE on it if not already set.

Something like (untested except for the openssl s390 testcase), haven't
checked what effects it has on the number of successful find_inc cases.

--- gcc/sched-deps.c.jj 2014-08-12 17:06:26.000000000 +0200
+++ gcc/sched-deps.c    2014-08-14 11:46:25.509631874 +0200
@@ -1233,6 +1233,13 @@ add_or_update_dep_1 (dep_t new_dep, bool
       switch (ask_dependency_caches (new_dep))
        {
        case DEP_PRESENT:
+         dep_t present_dep;
+         sd_iterator_def sd_it;
+      
+         present_dep = sd_find_dep_between_no_cache (DEP_PRO (new_dep),
+                                                     DEP_CON (new_dep),
+                                                     resolved_p, &sd_it);
+         DEP_MULTIPLE (present_dep) = 1;
          return DEP_PRESENT;
 
        case DEP_CHANGED:
@@ -4752,23 +4759,6 @@ find_inc (struct mem_inc_info *mii, bool
                goto next;
              }
 
-         /* The inc instruction could have clobbers, make sure those
-            registers are not used in mem insn.  */
-         FOR_EACH_INSN_DEF (def, mii->inc_insn)
-           if (!reg_overlap_mentioned_p (DF_REF_REG (def), mii->mem_reg0))
-             {
-               df_ref use;
-               FOR_EACH_INSN_USE (use, mii->mem_insn)
-                 if (reg_overlap_mentioned_p (DF_REF_REG (def),
-                                              DF_REF_REG (use)))
-                   {
-                     if (sched_verbose >= 5)
-                       fprintf (sched_dump,
-                                "inc clobber used in store failure.\n");
-                     goto next;
-                   }
-             }
-
          newaddr = mii->inc_input;
          if (mii->mem_index != NULL_RTX)
            newaddr = gen_rtx_PLUS (GET_MODE (newaddr), newaddr,


        Jakub

Reply via email to