From: Sven Verdoolaege Date: Sun, 1 Nov 2009 13:49:46 +0000 (+0100) Subject: isl_tab_basic_map_partial_lexopt: use context constraints when detecting equalities X-Git-Tag: isl-0.02~200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5838a24b6ca93204c2e7422550426d8885558bf2;p=platform%2Fupstream%2Fisl.git isl_tab_basic_map_partial_lexopt: use context constraints when detecting equalities The constraints of the context of the actual map may conspire to form equalities and we generally want to detect as many equalities as possible. Therefore, detect equalities in the intersection of the two and add these equalities to the map. Note that the equalities are now no longer detected in the map itself, so we may have to detect equalities again later if we are ever interested in the equalities of the map itself. --- diff --git a/isl_tab_pip.c b/isl_tab_pip.c index 64137dd..4758106 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -3848,6 +3848,7 @@ struct isl_map *isl_tab_basic_map_partial_lexopt( struct isl_map *result = NULL; struct isl_sol_map *sol_map = NULL; struct isl_context *context; + struct isl_basic_map *eq; if (empty) *empty = NULL; @@ -3857,7 +3858,10 @@ struct isl_map *isl_tab_basic_map_partial_lexopt( isl_assert(bmap->ctx, isl_basic_map_compatible_domain(bmap, dom), goto error); - bmap = isl_basic_map_detect_equalities(bmap); + eq = isl_basic_map_copy(bmap); + eq = isl_basic_map_intersect_domain(eq, isl_basic_set_copy(dom)); + eq = isl_basic_map_affine_hull(eq); + bmap = isl_basic_map_intersect(bmap, eq); if (dom->n_div) { dom = isl_basic_set_order_divs(dom);