isl_basic_map_gist: remove obviously redundant reduced div constraints
The core gist computation is performed on the pure constraints without
treating the integer divisions in any special way.
We may however be able to exploit information involving some
integer divisions in the context to simplify constraints involving
other, but related integer divisions in the input.
We therefore look for all equalities in the intersection of the input
and the context and perform the simplification relative to this intersection.
These equalities, or at least those that are not implied by
the equalities in the context, need to be added to the result
to ensure that the intersection with the context remains the same.
If these equalities involve any integer divisions, then the corresponding
div constraints may get simplified to constraints not involving the
integer divisions. These constraints may very well be redundant
with respect to the context. They not even have been part of the input.
On the other hand, we cannot simply drop all such constraints as that
may break the invariant that the intersection with the context
should remain the same.
In this commit, we remove those constraints derived from div
constraints that are obviously redundant with respect to the context.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>