isl_map_piplib.c: extremum_on: detect equalities first
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 22 May 2009 09:18:26 +0000 (11:18 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 11 Jun 2009 12:50:24 +0000 (14:50 +0200)
In a map with several divs, there may be some that are
actually equal to each other (up to a constant).  Any
div present in the map will make the search for the
lexicographic maximum or minimum more difficult, so
we want to remove such duplicate divs before embarking
on the search.

This situation occurs especially during dependence
analysis (in an outside user of isl).  Perhaps it
would be best if the outside user would attempt
to remove duplicate divs instead of doing it
indiscriminately inside the library, but for now
it is easiest to just put it here.

isl_map_piplib.c

index 25d223b..c5bacc1 100644 (file)
@@ -407,6 +407,7 @@ static struct isl_map *extremum_on(
        PipMatrix *domain = NULL, *context = NULL;
        unsigned         nparam, n_in, n_out;
 
+       bmap = isl_basic_map_detect_equalities(bmap);
        if (!bmap || !dom)
                goto error;