summaryrefslogtreecommitdiff
path: root/gcc/graphite-dependences.c
diff options
context:
space:
mode:
authorgrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-14 06:45:08 +0000
committergrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>2013-07-14 06:45:08 +0000
commitbffcae34bdf0412048ac450875a05b850eee5083 (patch)
tree7fa30f844d733a742d0c1c82dc483064dd6e42ea /gcc/graphite-dependences.c
parent8a33e3d45e3c2d9840b8837647d0d1daaaafc89c (diff)
downloadgcc-bffcae34bdf0412048ac450875a05b850eee5083.tar.gz
graphite: Do not depend on 2D + 1 form in parallelism check
PR tree-optimization/54094 * graphite-clast-to-gimple.c (translate_clast_for_loop): Derive the scheduling dimension for the parallelism check from the polyhedral information in the AST. * graphite-dependences.c (carries_deps): Do not assume the schedule is in 2D + 1 form. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200946 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-dependences.c')
-rw-r--r--gcc/graphite-dependences.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index 366588b3595..7fd4081e926 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -298,7 +298,7 @@ carries_deps (__isl_keep isl_union_map *schedule,
int depth)
{
bool res;
- int idx, i;
+ int i;
isl_space *space;
isl_map *lex, *x;
isl_constraint *ineq;
@@ -313,13 +313,12 @@ carries_deps (__isl_keep isl_union_map *schedule,
space = isl_map_get_space (x);
ineq = isl_inequality_alloc (isl_local_space_from_space (space));
- idx = 2 * depth + 1;
- for (i = 0; i < idx; i++)
+ for (i = 0; i < depth - 1; i++)
lex = isl_map_equate (lex, isl_dim_in, i, isl_dim_out, i);
/* in + 1 <= out */
- ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, idx, 1);
- ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, idx, -1);
+ ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_out, depth - 1, 1);
+ ineq = isl_constraint_set_coefficient_si (ineq, isl_dim_in, depth - 1, -1);
ineq = isl_constraint_set_constant_si (ineq, -1);
lex = isl_map_add_constraint (lex, ineq);
x = isl_map_intersect (x, lex);