isl_map_simplify.c: eliminate_unit_divs: use isl_basic_map_offset
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 4 Nov 2015 08:43:36 +0000 (4 09:43 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Sun, 2 Sep 2018 15:14:53 +0000 (2 17:14 +0200)
This reduces the dependence on the internal representation.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_map_simplify.c

index 7cb4301..524583a 100644 (file)
@@ -1317,7 +1317,7 @@ static __isl_give isl_basic_map *eliminate_unit_divs(
                return NULL;
 
        ctx = isl_basic_map_get_ctx(bmap);
-       total = 1 + isl_space_dim(bmap->dim, isl_dim_all);
+       total = isl_basic_map_offset(bmap, isl_dim_div);
 
        for (i = 0; i < bmap->n_div; ++i) {
                if (isl_int_is_zero(bmap->div[i][0]))