isl_map_coalesce: try and coalesce basic maps with different integer divisions
commitb6d921dfb89a4fcec6a79ce6bdeeb33be5778d57
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 11 Oct 2014 11:55:08 +0000 (11 13:55 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 12 Jan 2015 15:44:05 +0000 (12 16:44 +0100)
treea9d694691aa4e4c7fc8ebc8ecd3aa5b036396a40
parent2f82f48214e307e49678129e15d920fd22e1f807
isl_map_coalesce: try and coalesce basic maps with different integer divisions

If two basic maps have unknown or different integer divisions,
then it may still be possible to coalesce them if the existentially
quantified variables of one basic map happen to satisfy or be adjacent to
the constraints on the quantified variables of the other basic map.
In principle we should consider all possible matchings between
existentially quantified variables or use heuristics to determine
which existentially quantified variable in one basic map should
be matched to which existentially quantified variable in the other
basic map.  Currently, however, we only consider the given order
of the existentially quantified variables, which is already
an improvement compared to not allowing unknown or different
integer divisions at all.  We do require that the total number
of existentially quantified variables is the same in both
basic maps.  Note that this results in more pairs of basic maps
being considered for coalescing, but if the default matching
between existentially quantified variables is not fruitful,
then a separating constraint should be found fairly quickly.

The previous two commits made sure that the different ways
of combining two basic maps into one can handle the case
where the integer divisions are different in the two input basic maps.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_coalesce.c
isl_test.c