]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Allow several reductions in a reduction PBB.
authorSebastian Pop <sebastian.pop@amd.com>
Tue, 25 Jan 2011 06:47:21 +0000 (06:47 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Tue, 25 Jan 2011 06:47:21 +0000 (06:47 +0000)
2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>

* graphite-dependences.c (reduction_dr_1): Allow several reductions
in a reduction PBB.
* graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
that have already been marked as PBB_IS_REDUCTION.

From-SVN: r169212

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-dependences.c
gcc/graphite-sese-to-poly.c

index cb76451bab63805331b07e02cb76e004f800c31d..e67d343922cad1cd936c79edf7c8fdf2fa35ec1d 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-dependences.c (reduction_dr_1): Allow several reductions
+       in a reduction PBB.
+       * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
+       that have already been marked as PBB_IS_REDUCTION.
+
 2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-scop-detection.c (same_close_phi_node): New.
index 1782e768ec266f1159af1b96151f7fc0bf5d4c36..091bbcaa9ba877d5aea5ef5b8d1c909ae7680b4b 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-dependences.c (reduction_dr_1): Allow several reductions
+       in a reduction PBB.
+       * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
+       that have already been marked as PBB_IS_REDUCTION.
+
 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-scop-detection.c (same_close_phi_node): New.
index d45c7ce2aea326a05da0b257a7ce0acc9482c3cd..b9b1d1b5880339713b19338042537a97e556cf6a 100644 (file)
@@ -571,10 +571,11 @@ reduction_dr_1 (poly_bb_p pbb1, poly_dr_p pdr1, poly_dr_p pdr2)
   poly_dr_p pdr;
 
   FOR_EACH_VEC_ELT (poly_dr_p, PBB_DRS (pbb1), i, pdr)
-    if (PDR_TYPE (pdr) == PDR_WRITE)
-      break;
+    if (PDR_TYPE (pdr) == PDR_WRITE
+       && same_pdr_p (pdr, pdr1) && same_pdr_p (pdr, pdr2))
+      return true;
 
-  return same_pdr_p (pdr, pdr1) && same_pdr_p (pdr, pdr2);
+  return false;
 }
 
 /* Return true when the data dependence relation between the data
index 301fb9688ca4ba9331835d85cf253207f08f9d74..a7178efed94f6ee962bb66d183ff8c0c58156679 100644 (file)
@@ -2640,7 +2640,9 @@ split_reduction_stmt (scop_p scop, gimple stmt)
 
   /* Do not split basic blocks with no writes to memory: the reduction
      will be the only write to memory.  */
-  if (nb_data_writes_in_bb (bb) == 0)
+  if (nb_data_writes_in_bb (bb) == 0
+      /* Or if we have already marked BB as a reduction.  */
+      || PBB_IS_REDUCTION (pbb_from_bb (bb)))
     return bb;
 
   e1 = split_pbb (scop, pbb, bb, stmt);