isl_map_simplify.c: set_div_from_lower_bound: use isl_basic_map_offset
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 4 Nov 2015 08:41:52 +0000 (4 09:41 +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 383d11b..7d24026 100644 (file)
@@ -1063,7 +1063,7 @@ error:
 static __isl_give isl_basic_map *set_div_from_lower_bound(
        __isl_take isl_basic_map *bmap, int div, int ineq)
 {
-       unsigned total = 1 + isl_space_dim(bmap->dim, isl_dim_all);
+       unsigned total = isl_basic_map_offset(bmap, isl_dim_div);
 
        isl_seq_neg(bmap->div[div] + 1, bmap->ineq[ineq], total + bmap->n_div);
        isl_int_set(bmap->div[div][0], bmap->ineq[ineq][total + div]);