improve construction of the original schedule
The patch builds the original schedule based on the now optimized scattering dimension instead of building one based on the loop index only. The implementation is simpler and catches more cases where the original schedule and the transformed schedule are the same, such as the one below: for (i = 0; i < 1000; i++) { Temp = F[i]; for (j = 0; j < 1000; j++) { D[j] = E[j] * Temp; A[i][j] = A[i][j] + B[i][j] * C[i][j] - D[j] ; } D[i] = E[i] * F[i]; } * graphite-sese-to-poly.c (build_scop_original_schedule): Call isl_union_map_add_map on every pbb->schedule. From-SVN: r230191
This commit is contained in:
parent
d82f8c85fc
commit
eefa4bafa5
|
@ -1,3 +1,8 @@
|
||||||
|
2015-11-11 Abderrazek Zaafrani <a.zaafrani@samsung.com>
|
||||||
|
|
||||||
|
* graphite-sese-to-poly.c (build_scop_original_schedule): Call
|
||||||
|
isl_union_map_add_map on every pbb->schedule.
|
||||||
|
|
||||||
2015-11-11 Tom de Vries <tom@codesourcery.com>
|
2015-11-11 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
* tree-parloops.c (create_parallel_loop): Return void.
|
* tree-parloops.c (create_parallel_loop): Return void.
|
||||||
|
|
|
@ -446,31 +446,26 @@ build_scop_minimal_scattering (scop_p scop)
|
||||||
}
|
}
|
||||||
|
|
||||||
Static schedules for A to D expressed in a union map:
|
Static schedules for A to D expressed in a union map:
|
||||||
|
{
|
||||||
{ S_A[i0, i1] -> [i0, i1]; S_B[i0] -> [i0]; S_C[] -> []; S_9[i0] -> [i0] }
|
S_A[i0, i1] -> [0, i0, 0, i1];
|
||||||
|
S_B[i0] -> [0, i0, 1];
|
||||||
|
S_C[] -> [1];
|
||||||
|
S_D[i0] -> [2, i0, 0]
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
build_scop_original_schedule (scop_p scop)
|
build_scop_original_schedule (scop_p scop)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
poly_bb_p pbb;
|
||||||
|
|
||||||
isl_space *space = isl_set_get_space (scop->param_context);
|
isl_space *space = isl_set_get_space (scop->param_context);
|
||||||
isl_union_map *res = isl_union_map_empty (space);
|
isl_union_map *res = isl_union_map_empty (space);
|
||||||
|
|
||||||
int i;
|
|
||||||
poly_bb_p pbb;
|
|
||||||
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
FOR_EACH_VEC_ELT (scop->pbbs, i, pbb)
|
||||||
{
|
res = isl_union_map_add_map (res, isl_map_copy (pbb->schedule));
|
||||||
int nb_dimensions = isl_set_dim (pbb->domain, isl_dim_set);
|
|
||||||
isl_space *dc = isl_set_get_space (pbb->domain);
|
|
||||||
isl_space *dm = isl_space_add_dims (isl_space_from_domain (dc),
|
|
||||||
isl_dim_out, nb_dimensions);
|
|
||||||
isl_map *mp = isl_map_universe (dm);
|
|
||||||
for (int i = 0; i < nb_dimensions; i++)
|
|
||||||
mp = isl_map_equate (mp, isl_dim_in, i, isl_dim_out, i);
|
|
||||||
|
|
||||||
res = isl_union_map_add_map (res, mp);
|
|
||||||
}
|
|
||||||
scop->original_schedule = res;
|
scop->original_schedule = res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue