summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2012-02-07 12:17:03 +0100
committerSven Verdoolaege <skimo@kotnet.org>2012-02-07 13:00:21 +0100
commitd59376237bba0239709c03d347025f3a896164f9 (patch)
tree954fff721f654358fe810617aa1152d4603675ea
parent414b85f67d38ed9aeae9b4d424305956693c812d (diff)
downloadisl-d59376237bba0239709c03d347025f3a896164f9.tar.gz
isl-d59376237bba0239709c03d347025f3a896164f9.tar.bz2
isl-d59376237bba0239709c03d347025f3a896164f9.zip
isl_printer_print_pw_aff: skip constraints implied by div expression
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
-rw-r--r--isl_output.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/isl_output.c b/isl_output.c
index a61f6dec..1f6a01ad 100644
--- a/isl_output.c
+++ b/isl_output.c
@@ -1648,10 +1648,22 @@ static __isl_give isl_printer *print_affine_c(__isl_take isl_printer *p,
return print_partial_affine_c(p, dim, bset, c, len);
}
+/* We skip the constraint if it is implied by the div expression.
+ */
static __isl_give isl_printer *print_constraint_c(__isl_take isl_printer *p,
__isl_keep isl_space *dim,
__isl_keep isl_basic_set *bset, isl_int *c, const char *op, int first)
{
+ unsigned o_div;
+ unsigned n_div;
+ int div;
+
+ o_div = isl_basic_set_offset(bset, isl_dim_div);
+ n_div = isl_basic_set_dim(bset, isl_dim_div);
+ div = isl_seq_last_non_zero(c + o_div, n_div);
+ if (div >= 0 && isl_basic_set_is_div_constraint(bset, c, div))
+ return p;
+
if (!first)
p = isl_printer_print_str(p, " && ");