aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-dependences.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-11-25 05:14:24 +0000
committerSebastian Pop <sebastian.pop@amd.com>2009-11-25 05:14:24 +0000
commit4784895e28651a1e695a500276867ce28fa23ace (patch)
tree74f03cfa36b221d73044d5955b012d47314293c9 /gcc/graphite-dependences.c
parent1dd7d6003e1d117db79727fbe0423f24edad0995 (diff)
2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
* graphite-dependences.c (dependence_polyhedron_1): Add the context to the dependence polyhedron. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@154603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-dependences.c')
-rw-r--r--gcc/graphite-dependences.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index 5480a36a6d6..ab08789c150 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -121,7 +121,7 @@ pddr_is_empty (poly_ddr_p pddr)
/* Returns a polyhedron of dimension DIM.
- Maps the dimensions [0, ..., cut - 1] of polyhedron P to OFFSET0
+ Maps the dimensions [0, ..., cut - 1] of polyhedron P to OFFSET
and the dimensions [cut, ..., nb_dim] to DIM - GDIM. */
static ppl_Pointset_Powerset_C_Polyhedron_t
@@ -388,7 +388,16 @@ build_lexicographically_gt_constraint (ppl_Pointset_Powerset_C_Polyhedron_t *res
}
}
-/* Build the dependence polyhedron for data references PDR1 and PDR2. */
+/* Build the dependence polyhedron for data references PDR1 and PDR2.
+ The layout of the dependence polyhedron is:
+
+ T1|I1|T2|I2|S1|S2|G
+
+ with
+ | T1 and T2 the scattering dimensions for PDR1 and PDR2
+ | I1 and I2 the iteration domains
+ | S1 and S2 the subscripts
+ | G the global parameters. */
static poly_ddr_p
dependence_polyhedron_1 (poly_bb_p pbb1, poly_bb_p pbb2,
@@ -414,8 +423,14 @@ dependence_polyhedron_1 (poly_bb_p pbb1, poly_bb_p pbb2,
ppl_Pointset_Powerset_C_Polyhedron_t res;
ppl_Pointset_Powerset_C_Polyhedron_t id1, id2, isc1, isc2, idr1, idr2;
ppl_Pointset_Powerset_C_Polyhedron_t sc1, sc2, dreq;
+ ppl_Pointset_Powerset_C_Polyhedron_t context;
gcc_assert (PBB_SCOP (pbb1) == PBB_SCOP (pbb2));
+
+ ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron
+ (&context, SCOP_CONTEXT (scop));
+ ppl_insert_dimensions_pointset (context, 0, dim - gdim);
+
ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&sc1, s1);
ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (&sc2, s2);
@@ -433,6 +448,7 @@ dependence_polyhedron_1 (poly_bb_p pbb1, poly_bb_p pbb2,
dreq = dr_equality_constraints (dim, tdim1 + ddim1 + tdim2 + ddim2, sdim1);
ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (&res, dim, 0);
+ ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, context);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, id1);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, id2);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, isc1);
@@ -440,6 +456,7 @@ dependence_polyhedron_1 (poly_bb_p pbb1, poly_bb_p pbb2,
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, idr1);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, idr2);
ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (res, dreq);
+ ppl_delete_Pointset_Powerset_C_Polyhedron (context);
ppl_delete_Pointset_Powerset_C_Polyhedron (id1);
ppl_delete_Pointset_Powerset_C_Polyhedron (id2);
ppl_delete_Pointset_Powerset_C_Polyhedron (sc1);