{
enum isl_ineq_type type = isl_tab_ineq_type(tab, ineq);
switch (type) {
+ default:
case isl_ineq_error: return STATUS_ERROR;
case isl_ineq_redundant: return STATUS_VALID;
case isl_ineq_separate: return STATUS_SEPARATE;
for (k = 0; k < map->p[i]->n_ineq; ++k) {
if (ineq_i[k] != STATUS_CUT)
continue;
- tabs[i] = isl_tab_select_facet(tabs[i], n_eq + k);
+ if (isl_tab_select_facet(tabs[i], n_eq + k) < 0)
+ return -1;
for (l = 0; l < map->p[j]->n_ineq; ++l) {
int stat;
if (ineq_j[l] != STATUS_CUT)
snap = isl_tab_snap(tabs[i]);
tabs[i] = isl_tab_relax(tabs[i], n_eq + k);
snap2 = isl_tab_snap(tabs[i]);
- tabs[i] = isl_tab_select_facet(tabs[i], n_eq + k);
+ if (isl_tab_select_facet(tabs[i], n_eq + k) < 0)
+ return -1;
super = contains(map, j, ineq_j, tabs[i]);
if (super) {
if (isl_tab_rollback(tabs[i], snap2) < 0)
snap = isl_tab_snap(tabs[i]);
- tabs[i] = isl_tab_select_facet(tabs[i], map->p[i]->n_eq + k);
+ if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + k) < 0)
+ goto error;
if (isl_tab_detect_redundant(tabs[i]) < 0)
goto error;
wraps->n_row = 0;
for (k = 0; k < n; ++k) {
- tabs[i] = isl_tab_select_facet(tabs[i],
- map->p[i]->n_eq + cuts[k]);
+ if (isl_tab_select_facet(tabs[i], map->p[i]->n_eq + cuts[k]) < 0)
+ goto error;
if (isl_tab_detect_redundant(tabs[i]) < 0)
goto error;
set_is_redundant(tabs[i], map->p[i]->n_eq, cuts, n, k, 1);
isl_seq_cpy(bound->el, map->p[i]->ineq[cuts[k]], 1 + total);
isl_int_add_ui(bound->el[0], bound->el[0], 1);
- tabs[j] = isl_tab_add_eq(tabs[j], bound->el);
+ if (isl_tab_add_eq(tabs[j], bound->el) < 0)
+ goto error;
if (isl_tab_detect_redundant(tabs[j]) < 0)
goto error;
struct isl_tab **tabs, int *eq_i, int *ineq_i, int *eq_j, int *ineq_j)
{
int changed = 0;
- int k, l, m;
- unsigned total = isl_basic_map_total_dim(map->p[i]);
- struct isl_tab_undo *snap;
+ int k, m;
int n;
int *cuts = NULL;
if (!tabs[i])
goto error;
if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_IMPLICIT))
- tabs[i] = isl_tab_detect_implicit_equalities(tabs[i]);
+ if (isl_tab_detect_implicit_equalities(tabs[i]) < 0)
+ goto error;
if (!ISL_F_ISSET(map->p[i], ISL_BASIC_MAP_NO_REDUNDANT))
if (isl_tab_detect_redundant(tabs[i]) < 0)
goto error;