OSDN Git Service

Allow several reductions in a reduction PBB.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Jan 2011 06:47:21 +0000 (06:47 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169212 138bc75d-0d04-0410-961f-82ee72b054a4

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

index cb76451..e67d343 100644 (file)
@@ -1,5 +1,12 @@
 2011-01-25  Sebastian Pop  <sebastian.pop@amd.com>
 
 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.
        (remove_duplicate_close_phi): New.
        (make_close_phi_nodes_unique): New.
        * graphite-scop-detection.c (same_close_phi_node): New.
        (remove_duplicate_close_phi): New.
        (make_close_phi_nodes_unique): New.
index 1782e76..091bbca 100644 (file)
@@ -1,5 +1,12 @@
 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
 
 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.
        (remove_duplicate_close_phi): New.
        (make_close_phi_nodes_unique): New.
        * graphite-scop-detection.c (same_close_phi_node): New.
        (remove_duplicate_close_phi): New.
        (make_close_phi_nodes_unique): New.
index d45c7ce..b9b1d1b 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)
   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
 }
 
 /* Return true when the data dependence relation between the data
index 301fb96..a7178ef 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.  */
 
   /* 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);
     return bb;
 
   e1 = split_pbb (scop, pbb, bb, stmt);