diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 112eaad4d07..f0b08515a85 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,11 @@ +2010-02-07 Sebastian Pop + + 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 * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/. diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index 4dc5854b3f9..bd83e15ca62 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -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); diff --git a/libgomp/ChangeLog.graphite b/libgomp/ChangeLog.graphite index 9f2ce6683ed..ee2cddb7013 100644 --- a/libgomp/ChangeLog.graphite +++ b/libgomp/ChangeLog.graphite @@ -1,3 +1,8 @@ +2010-02-07 Sebastian Pop + + * testsuite/libgomp.graphite/force-parallel-5.c: Un-XFAILed. + * testsuite/libgomp.graphite/pr41118.c: Renamed from pr4118. + 2009-10-09 Sebastian Pop * testsuite/libgomp.graphite/graphite.exp (PARALLEL_CFLAGS): Add diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-5.c b/libgomp/testsuite/libgomp.graphite/force-parallel-5.c index e5392b1b8ff..b72b0215f3f 100644 --- a/libgomp/testsuite/libgomp.graphite/force-parallel-5.c +++ b/libgomp/testsuite/libgomp.graphite/force-parallel-5.c @@ -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" } } */ diff --git a/libgomp/testsuite/libgomp.graphite/pr4118.c b/libgomp/testsuite/libgomp.graphite/pr41118.c similarity index 100% rename from libgomp/testsuite/libgomp.graphite/pr4118.c rename to libgomp/testsuite/libgomp.graphite/pr41118.c