summaryrefslogtreecommitdiff
path: root/isl_tab_pip.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2011-02-05 21:05:07 +0100
committerSven Verdoolaege <skimo@kotnet.org>2011-02-05 21:05:07 +0100
commit3a37260f65351a47d453f33e057c8f1e9ff0fba8 (patch)
tree9728130b5a3f56a3b89b971ba3453afa87285a9c /isl_tab_pip.c
parent10488bffb1aeef848cbc57ce96dd2e4edb9f22c2 (diff)
parentb9791ad473737122c50378d6d0eaff7f5e414234 (diff)
downloadisl-3a37260f65351a47d453f33e057c8f1e9ff0fba8.tar.gz
isl-3a37260f65351a47d453f33e057c8f1e9ff0fba8.tar.bz2
isl-3a37260f65351a47d453f33e057c8f1e9ff0fba8.zip
Merge branch 'maint'
Diffstat (limited to 'isl_tab_pip.c')
-rw-r--r--isl_tab_pip.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/isl_tab_pip.c b/isl_tab_pip.c
index 401d475f..d09330fa 100644
--- a/isl_tab_pip.c
+++ b/isl_tab_pip.c
@@ -2257,11 +2257,25 @@ static int context_lex_get_div(struct isl_context *context, struct isl_tab *tab,
return get_div(tab, context, div);
}
+/* Add a div specified by "div" to the context tableau and return
+ * 1 if the div is obviously non-negative.
+ * context_tab_add_div will always return 1, because all variables
+ * in a isl_context_lex tableau are non-negative.
+ * However, if we are using a big parameter in the context, then this only
+ * reflects the non-negativity of the variable used to _encode_ the
+ * div, i.e., div' = M + div, so we can't draw any conclusions.
+ */
static int context_lex_add_div(struct isl_context *context, struct isl_vec *div)
{
struct isl_context_lex *clex = (struct isl_context_lex *)context;
- return context_tab_add_div(clex->tab, div,
+ int nonneg;
+ nonneg = context_tab_add_div(clex->tab, div,
context_lex_add_ineq_wrap, context);
+ if (nonneg < 0)
+ return -1;
+ if (clex->tab->M)
+ return 0;
+ return nonneg;
}
static int context_lex_detect_equalities(struct isl_context *context,