isl_map_print: allow empty constraints
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 9 Apr 2010 10:52:47 +0000 (12:52 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 9 Apr 2010 11:12:34 +0000 (13:12 +0200)
A basic map that is passed to the user should never contain a constraint
"0 >= 0".  However, internally, such constraints can exist for a while
and for debugging purposes, it's convenient to be able to print
basic maps with such constraints.

isl_output.c

index e755c3d..e4d3e03 100644 (file)
@@ -340,7 +340,8 @@ static __isl_give isl_printer *print_constraints(__isl_keep isl_basic_map *bmap,
                int l = isl_seq_last_non_zero(bmap->ineq[i], 1 + total);
                int s;
                const char *op;
-               isl_assert(bmap->ctx, l >= 0, goto error);
+               if (l < 0)
+                       continue;
                s = isl_int_sgn(bmap->ineq[i][l]);
                if (s < 0)
                        isl_seq_cpy(c->el, bmap->ineq[i], 1 + total);