isl_map_coalesce: harmonize integer divisions in stride constraints
Commit
8eb322e (isl_map_coalesce: harmonize integer divisions that differ by
a constant, Mon Oct 13 22:54:29 2014 +0200) introduced support for
harmonizing integer divisions that only differ by an integer constant.
In a recent commit, this was extended to take into account
equality constraints, but the difference between the integer divisions
was still required to be an integer constant.
This commit also harmonizes some integer divisions that differ
by a rational constant. In particular, an integer division
that is defined by a stride constraint can take on different
values for the constant term without affecting its meaning
(when combined with the stride constraint).
This commit changes those integer divisions to have a zero
constant term, harmonizing pairs of integer divisions that
originally differed only by a rational constant.
Harmonizing such integer divisions ensures that their
definition is kept when the disjuncts in which they appear
get fused. This in turn increases the likelihood of the fused
disjunct getting coalesced with other disjuncts.
This harmonization process could be extended to constraints
that force a modulo expression to lie within certain integer bounds,
rather than being equated to a single integer.
It may not always be possible to change the constant term to a zero
in the case of a pair of bounds, but it may still be possible
to find a common constant term that can be used in both disjuncts.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>