Commit 7491e5f0 by Konrad Trifunovic Committed by Sebastian Pop

Fix memory leak in DD XFAILs some interchange testcases.

2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
	    Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-dependences.c (graphite_legal_transform_dr): Work on a
	copy of the dependence polyhedron.  Free the temporary objects.
	(graphite_carried_dependence_level_k): Free unused objects before
	returning.

	* testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
	* testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
	* testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
	* testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
	* testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.


Co-Authored-By: Sebastian Pop <sebastian.pop@amd.com>

From-SVN: r150687
parent f4648ed1
2009-08-12 Konrad Trifunovic <konrad.trifunovic@gmail.com>
Sebastian Pop <sebastian.pop@amd.com>
* graphite-dependences.c (graphite_legal_transform_dr): Work on a
copy of the dependence polyhedron. Free the temporary objects.
(graphite_carried_dependence_level_k): Free unused objects before
returning.
* testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
......
2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
Sebastian Pop <sebastian.pop@amd.com>
* graphite-dependences.c (graphite_legal_transform_dr): Work on a
copy of the dependence polyhedron. Free the temporary objects.
(graphite_carried_dependence_level_k): Free unused objects before
returning.
* testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
* testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
......
......@@ -513,6 +513,17 @@ graphite_legal_transform_dr (poly_bb_p pbb1, poly_bb_p pbb2,
graphite_dim_t otdim2 = pbb_nb_scattering_orig (pbb2);
graphite_dim_t ttdim1 = pbb_nb_scattering_transform (pbb1);
graphite_dim_t ttdim2 = pbb_nb_scattering_transform (pbb2);
ppl_Pointset_Powerset_C_Polyhedron_t temp;
ppl_dimension_type pdim;
bool is_empty_p;
/* Copy the PO polyhedron into the TEMP, so it is not destroyed.
Keep in mind, that PO polyhedron might be restored from the cache
and should not be modified! */
ppl_Pointset_Powerset_C_Polyhedron_space_dimension (po, &pdim);
ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (&temp,
pdim, 0);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (temp, po);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nloop carries dependency.\n");
......@@ -520,14 +531,18 @@ graphite_legal_transform_dr (poly_bb_p pbb1, poly_bb_p pbb2,
false, false);
/* Extend PO and PT to have the same dimensions. */
ppl_insert_dimensions_pointset (po, otdim1, ttdim1);
ppl_insert_dimensions_pointset (po, otdim1 + ttdim1 + ddim1 + otdim2,
ppl_insert_dimensions_pointset (temp, otdim1, ttdim1);
ppl_insert_dimensions_pointset (temp, otdim1 + ttdim1 + ddim1 + otdim2,
ttdim2);
ppl_insert_dimensions_pointset (pt, 0, otdim1);
ppl_insert_dimensions_pointset (pt, otdim1 + ttdim1 + ddim1, otdim2);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (po, pt);
return ppl_Pointset_Powerset_C_Polyhedron_is_empty (po);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (temp, pt);
is_empty_p = ppl_Pointset_Powerset_C_Polyhedron_is_empty (temp);
ppl_delete_Pointset_Powerset_C_Polyhedron (temp);
ppl_delete_Pointset_Powerset_C_Polyhedron (pt);
return is_empty_p;
}
}
......@@ -674,7 +689,6 @@ graphite_carried_dependence_level_k (poly_dr_p pdr1, poly_dr_p pdr2,
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (eqpp, po);
empty_p = ppl_Pointset_Powerset_C_Polyhedron_is_empty (eqpp);
ppl_delete_Pointset_Powerset_C_Polyhedron (po);
ppl_delete_Pointset_Powerset_C_Polyhedron (eqpp);
return !empty_p;
}
......
......@@ -16,5 +16,5 @@ int foo(int N, int *res)
*res = sum + N;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
......@@ -20,5 +20,5 @@ int foo(int N, int *res)
*res = sum + N;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
......@@ -15,5 +15,5 @@ int foo(int N, int *res)
*res = sum + N;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
......@@ -14,5 +14,5 @@ int foo(int N, int *res)
*res = sum + N;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
......@@ -10,5 +10,5 @@ double foo(double *a)
return r;
}
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" } } */
/* { dg-final { scan-tree-dump-times "will be interchanged" 1 "graphite" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment