OSDN Git Service

Fix PR42988: handle unknown_dependence.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Feb 2010 19:49:06 +0000 (19:49 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Feb 2010 19:49:06 +0000 (19:49 +0000)
2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>

PR middle-end/42988
* graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
to unknown_dependence.
(graphite_legal_transform_dr): Handle the unknown_dependence.
(graphite_carried_dependence_level_k): Same.

* testsuite/libgomp.graphite/force-parallel-5.c: Un-XFAILed.
* testsuite/libgomp.graphite/pr41118.c: Renamed from pr4118.

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

gcc/ChangeLog.graphite
gcc/graphite-dependences.c
libgomp/ChangeLog.graphite
libgomp/testsuite/libgomp.graphite/force-parallel-5.c
libgomp/testsuite/libgomp.graphite/pr41118.c [moved from libgomp/testsuite/libgomp.graphite/pr4118.c with 100% similarity]

index 112eaad..f0b0851 100644 (file)
@@ -1,5 +1,13 @@
 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
 
+       PR middle-end/42988
+       * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
+       to unknown_dependence.
+       (graphite_legal_transform_dr): Handle the unknown_dependence.
+       (graphite_carried_dependence_level_k): Same.
+
+2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
+
        * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
 
 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
index 4dc5854..bd83e15 100644 (file)
@@ -603,6 +603,11 @@ dependence_polyhedron (poly_dr_p pdr1, poly_dr_p pdr2,
 
   res = new_poly_ddr (pdr1, pdr2, ddp, original_scattering_p);
 
+  if (!(pdr_read_p (pdr1) && pdr_read_p (pdr2))
+      && PDR_BASE_OBJECT_SET (pdr1) != PDR_BASE_OBJECT_SET (pdr2)
+      && poly_drs_may_alias_p (pdr1, pdr2))
+    PDDR_KIND (res) = unknown_dependence;
+
   if (original_scattering_p)
     *x = res;
 
@@ -669,7 +674,9 @@ graphite_legal_transform_dr (poly_dr_p pdr1, poly_dr_p pdr2)
      i.e. the transform should reverse no dependences, and so PT, the
      reversed transformed PDDR, should have no constraint from PO.  */
   opddr = dependence_polyhedron (pdr1, pdr2, 1, true);
-  tpddr = dependence_polyhedron (pdr1, pdr2, -1, false);
+
+  if (PDDR_KIND (opddr) == unknown_dependence)
+    return false;
 
     /* There are no dependences between PDR1 and PDR2 in the original
        version of the program, or after the transform, so the
@@ -677,6 +684,14 @@ graphite_legal_transform_dr (poly_dr_p pdr1, poly_dr_p pdr2)
   if (pddr_is_empty (opddr))
     return true;
 
+  tpddr = dependence_polyhedron (pdr1, pdr2, -1, false);
+
+  if (PDDR_KIND (tpddr) == unknown_dependence)
+    {
+      free_poly_ddr (tpddr);
+      return false;
+    }
+
   if (pddr_is_empty (tpddr))
     {
       free_poly_ddr (tpddr);
@@ -792,6 +807,12 @@ graphite_carried_dependence_level_k (poly_dr_p pdr1, poly_dr_p pdr2,
   bool empty_p;
   poly_ddr_p pddr = dependence_polyhedron (pdr1, pdr2, 1, false);
 
+  if (PDDR_KIND (pddr) == unknown_dependence)
+    {
+      free_poly_ddr (pddr);
+      return true;
+    }
+
   if (pddr_is_empty (pddr))
     {
       free_poly_ddr (pddr);
index 9f2ce66..ee2cddb 100644 (file)
@@ -1,3 +1,8 @@
+2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * testsuite/libgomp.graphite/force-parallel-5.c: Un-XFAILed.
+       * testsuite/libgomp.graphite/pr41118.c: Renamed from pr4118.
+
 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
 
        * testsuite/libgomp.graphite/graphite.exp (PARALLEL_CFLAGS): Add
index e5392b1..b72b021 100644 (file)
@@ -34,6 +34,6 @@ int main(void)
 /* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
 /* { dg-final { cleanup-tree-dump "graphite" } } */
 /* { dg-final { scan-tree-dump-times "loopfn.0" 5 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "loopfn.1" 5 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "loopfn.1" 5 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "parloops" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */