isl_term_get_div: support nested divs
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 30 Mar 2012 13:14:54 +0000 (15:14 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 17 Apr 2012 16:52:09 +0000 (18:52 +0200)
Ever since 028d1a7 (drop isl_div abstraction, Fri Sep 9 14:55:16 2011 +0200),
the result of isl_term_get_div is an isl_aff and it can handle nested divs
just fine.  We therefore simply need to remove the now redundant check.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_polynomial.c

index 80a7b1a..efab1bd 100644 (file)
@@ -3581,7 +3581,6 @@ __isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos)
 {
        isl_local_space *ls;
        isl_aff *aff;
-       unsigned total;
 
        if (!term)
                return NULL;
@@ -3589,13 +3588,6 @@ __isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos)
        isl_assert(term->dim->ctx, pos < isl_term_dim(term, isl_dim_div),
                        return NULL);
 
-       total = term->div->n_col - term->div->n_row - 2;
-       /* No nested divs for now */
-       isl_assert(term->dim->ctx,
-               isl_seq_first_non_zero(term->div->row[pos] + 2 + total,
-                                       term->div->n_row) == -1,
-               return NULL);
-
        ls = isl_local_space_alloc_div(isl_space_copy(term->dim),
                                        isl_mat_copy(term->div));
        aff = isl_aff_alloc(ls);