isl_basic_map_foreach_lexopt: properly merge partial solutions
commitb9f95db6ed60902342984fc3de00a9ab81bef35e
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 20 Mar 2013 08:55:50 +0000 (20 09:55 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 20 Mar 2013 09:02:56 +0000 (20 10:02 +0100)
tree8de7394a1f21b138382701d8f7486e6113c49638
parent9ce5772769759c749dc7c0f083229e48d6b50a6e
isl_basic_map_foreach_lexopt: properly merge partial solutions

If we detect two identical solutions in adjacent parts of the search space,
then we merge them into a single solution.  The combined domain may however
have fewer existentially quantified variables and so we also need to adjust
the matrix representing the solution on that domain to no longer refer
to the extra existentially quantified variables.  Otherwise, the code
in sol_for_add could end up accessing elements of aff->v outside its bounds.
Note that it is safe to remove the columns that refer to the extra
existentially quantified variables since their coefficients need to be zero
for the two partial solutions to be considered identical.

Reported-by: Andreas Kloeckner <lists@informa.tiker.net>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_tab_pip.c
isl_test.c