From 97367264864abd8583a3eedf52b55e1a9055917a Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 17 Nov 2015 12:16:23 +0100 Subject: [PATCH] isl_basic_map_drop_div: drop removal of constraints involving div This removal is no longer needed now that remove_redundant_divs calls isl_basic_map_drop_constraints_involving before dropping the integer division. Signed-off-by: Sven Verdoolaege --- isl_map.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/isl_map.c b/isl_map.c index ca7c886f..17f5e877 100644 --- a/isl_map.c +++ b/isl_map.c @@ -2313,8 +2313,11 @@ __isl_give isl_set *isl_set_drop(__isl_take isl_set *set, return set_from_map(isl_map_drop(set_to_map(set), type, first, n)); } -/* - * We don't cow, as the div is assumed to be redundant. +/* Drop the integer division at position "div", which is assumed + * not to appear in any of the constraints or + * in any of the other integer divisions. + * + * Since the integer division is redundant, there is no need to cow. */ __isl_give isl_basic_map *isl_basic_map_drop_div( __isl_take isl_basic_map *bmap, unsigned div) @@ -2332,14 +2335,8 @@ __isl_give isl_basic_map *isl_basic_map_drop_div( for (i = 0; i < bmap->n_eq; ++i) constraint_drop_vars(bmap->eq[i]+pos, 1, bmap->extra-div-1); - for (i = 0; i < bmap->n_ineq; ++i) { - if (!isl_int_is_zero(bmap->ineq[i][pos])) { - isl_basic_map_drop_inequality(bmap, i); - --i; - continue; - } + for (i = 0; i < bmap->n_ineq; ++i) constraint_drop_vars(bmap->ineq[i]+pos, 1, bmap->extra-div-1); - } for (i = 0; i < bmap->n_div; ++i) constraint_drop_vars(bmap->div[i]+1+pos, 1, bmap->extra-div-1); -- 2.11.4.GIT