isl_map_simplify.c: uset_gist_full: check for redundant constraints in order
commitdf2e2fc75c73e968a0e9da18bea56ea2afdeea04
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 20 Jun 2015 15:30:19 +0000 (20 17:30 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 28 Jul 2015 14:11:59 +0000 (28 16:11 +0200)
treeeab4759f9040bfc642a97587df6fb696a83a52c6
parent88d9f9fc79e354f9c2f2ffb02f9b151147813bb8
isl_map_simplify.c: uset_gist_full: check for redundant constraints in order

In particular, the constraints of the input are sorted in the caller
to favor constraints that do not involve existentially quantified
variables over those that do.  However, when checking which constraint
is redundant with respect to the other constraints in the sense that
the negation results in a contradiction, the first constraint would
be checked first.  This means that if two constraints are mutually
redundant, the first would end up getting removed.
Moreover, the shifted constraints are removed first and this
may result in some constraints changing position to fill up
the position of the removed constraints.

To avoid the reordering, do not remove the constraints immediately,
but mark them for removal first.
Additionally, consider the constraints from least favorable
to most favorable instead of the other way around.

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