From 7635ee8ae7ea70cef81e389155ef7e1694af0c09 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 22 May 2009 11:18:26 +0200 Subject: [PATCH] isl_map_piplib.c: extremum_on: detect equalities first 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/isl_map_piplib.c b/isl_map_piplib.c index 25d223b..c5bacc1 100644 --- a/isl_map_piplib.c +++ b/isl_map_piplib.c @@ -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; -- 2.7.4