isl_schedule_constraints_compute_schedule: compress iteration domain
The number of schedule rows needed for an iteration domain
should depend on the dimension of the iteration domain itself and
not on the dimension of the ambient space.
Otherwise, the scheduler will needlessly look for linearly
independent rows that are actually linearly dependent when
taking into account the domain constraints.
In particular, this can lead to schedule dimensions being
marked "coincident" even if they only have a single iteration
based on the domain constraints.
Whenever we find an equality in the iteration domains,
perform the scheduling on the compressed iteration domains
rather than the original iteration domains.
We need to intersect the schedule constraints with the affine
hulls that are used to compute the compression as otherwise
the scheduler may be constrained by constraints on iterations
that it has no control over (because they have no counterparts
in the compressed domains).
Note that we cannot simply intersect the schedule constraints
with all domain constraints as these may imply upper bounds
on the parameters and the current scheduler cannot handle
these very well. In particular, it may exploit such bounds
to perform loop coalescing.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>