isl_schedule_constraints_compute_schedule: compress iteration domain
commit82416541bfb8fc2acb026dc6680a25dcf862aa23
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 2 May 2014 09:51:31 +0000 (2 11:51 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 30 Sep 2014 07:55:45 +0000 (30 09:55 +0200)
treef97c2e60238c345cbf126776d9a7cbd8e33b6fec
parent8fbf7cfb313f0fdb7ffff46f19c09650004d40ed
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>
isl_schedule.c