From 573b1ad542f41cb9b54c2cbc0808fe5b668b30df Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 4 Aug 2009 17:00:43 +0200 Subject: [PATCH] isl_map_simplify.c: remove_dependent_vars: only remove definitions of divs Don't remove the dependent divs themselves, because in particular eliminate_divs_ineq does not expect any other divs to get removed. --- isl_map_simplify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/isl_map_simplify.c b/isl_map_simplify.c index 5f06d840..41aeb1e0 100644 --- a/isl_map_simplify.c +++ b/isl_map_simplify.c @@ -1173,7 +1173,9 @@ error: } -/* Remove any div that is defined in terms of the given variable. +/* Remove definition of any div that is defined in terms of the given variable. + * The div itself is not removed. Functions such as + * eliminate_divs_ineq depend on the other divs remaining in place. */ static struct isl_basic_map *remove_dependent_vars(struct isl_basic_map *bmap, int pos) @@ -1186,9 +1188,7 @@ static struct isl_basic_map *remove_dependent_vars(struct isl_basic_map *bmap, continue; if (isl_int_is_zero(bmap->div[i][1+1+pos])) continue; - bmap = isl_basic_map_eliminate_vars(bmap, dim + i, 1); - if (!bmap) - return NULL; + isl_int_set_si(bmap->div[i][0], 0); } return bmap; } -- 2.11.4.GIT