[Bug tree-optimization/66997] outer loop reduction fails to parallelize with graphite

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 24 15:54:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66997

--- Comment #2 from vries at gcc dot gnu.org ---
Using this patch, we don't bail out immediately when graphite didn't set
loop->can_be_parallel, but try a bit harder:
...
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 88f22e8..51f157d 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2548,15 +2548,6 @@ parallelize_loops (void)
          fprintf (dump_file, "loop %d is innermost\n",loop->num);
       }

-      /* If we use autopar in graphite pass, we use its marked dependency
-      checking results.  */
-      if (flag_loop_parallelize_all && !loop->can_be_parallel)
-      {
-        if (dump_file && (dump_flags & TDF_DETAILS))
-          fprintf (dump_file, "loop is not parallel according to graphite\n");
-       continue;
-      }
-
       if (!single_dom_exit (loop))
       {

@@ -2592,7 +2583,7 @@ parallelize_loops (void)
       if (!try_create_reduction_list (loop, &reduction_list))
        continue;

-      if (!flag_loop_parallelize_all
+      if (!loop->can_be_parallel
          && !loop_parallel_p (loop, &parloop_obstack))
        continue;

...

We manage to get to a more verbose error:
...
uns-outer-6.c:18:1: note: Symbolic number of iterations is (unsigned long)
N_8(D)
uns-outer-6.c:18:1: note: not vectorized: control flow in loop.
phi is Close_Phi.10_I_lsm.17_74 = PHI <Close_Phi.10_I_lsm.17_6(9)>
arg of phi to exit:   value Close_Phi.10_I_lsm.17_6 used outside loop
  checking if it a part of reduction pattern:
  FAILED: it is not a part of reduction.
...



More information about the Gcc-bugs mailing list