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>