scheduler: compute sizes used for coalescing avoidance on convex set
commit303941494b75b43dce5b0d10b1696df2ef1d4c98
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 27 Jul 2017 06:06:40 +0000 (27 08:06 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Wed, 16 Aug 2017 12:38:10 +0000 (16 14:38 +0200)
tree61ed1a1cd82063df932d11b82ba9c286f4588f09
parent02fa3b9c69cb65a9a29d3e745513a81a9aa61cf4
scheduler: compute sizes used for coalescing avoidance on convex set

The size computation introduced in isl-0.16.1-230-gf8f45dff9e
(isl_schedule_constraints_compute_schedule: optionally avoid loop
coalescing, Tue Apr 12 17:20:31 2016 +0200) tacitly assumes
that the input set is convex.  For non-convex inputs, in particular
for unions of lower-dimensional sets as in the new test case,
it may conclude that the size in a direction is one, simply because
it is one in each individual disjunct.
This could then result in schedules with coefficients greater than one
mistakenly being treated as coalescing, forcing the computation of
a different schedule.  For the new test case, this means that
a schedule with two bands would be created instead of one with
a single band.  This is not a major problem for this test case
because tiling is unlikely to be very beneficial for such domains.

However, since isl-0.18-724-gf936fb0ca5 (scheduler: drop constraints
that can only be used for coalescing, Thu Feb 23 14:22:27 2017 +0100),
the same sizes are also used to drop constraints.  When the wrong sizes
are used, this would drop too many constraints, resulting in
the scheduler being unable to find any schedule.

Compute the sizes based on a convex superset of the domain
to avoid these issues.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_scheduler.c
test_inputs/schedule/disjunctive_domain.sc [new file with mode: 0644]
test_inputs/schedule/disjunctive_domain.st [new file with mode: 0644]