isl_basic_map_gist: remove obviously redundant reduced div constraints
commit9cdb48bf8b0cb5a305d2034981529ecac56398f2
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 23 Jul 2014 10:29:26 +0000 (23 12:29 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 15 Sep 2014 15:57:19 +0000 (15 17:57 +0200)
treee4aafad14e9b18c51af230dcf40ffcb1e41abf5f
parente72d7e21dd8a22f65b00acd847a8e795d7a2c0d6
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>
isl_map_simplify.c
isl_test.c