summaryrefslogtreecommitdiff
path: root/isl_tab.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2009-03-23 09:21:22 +0100
committerSven Verdoolaege <skimo@kotnet.org>2009-03-23 10:00:20 +0100
commitbc8d409a0e3e19ed9a139197e4a19fc6d4df1ba6 (patch)
tree62673df5b3de284569b955714fa0bbda2290e468 /isl_tab.c
parentc4d0826abffbbed33e25d1b478e44155cd02d930 (diff)
downloadisl-bc8d409a0e3e19ed9a139197e4a19fc6d4df1ba6.tar.gz
isl-bc8d409a0e3e19ed9a139197e4a19fc6d4df1ba6.tar.bz2
isl-bc8d409a0e3e19ed9a139197e4a19fc6d4df1ba6.zip
isl_tab.c: store number of equalities among the constraints in tableau
Before, we would check the bmap to figure out how many equalities we had added, but there was at least one instance where we didn't actually store the equalities in the tableau, leading to problems if any additional equalities would be found in the tableau.
Diffstat (limited to 'isl_tab.c')
-rw-r--r--isl_tab.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/isl_tab.c b/isl_tab.c
index b3e56181..7aeac66c 100644
--- a/isl_tab.c
+++ b/isl_tab.c
@@ -42,6 +42,7 @@ struct isl_tab *isl_tab_alloc(struct isl_ctx *ctx,
}
tab->n_row = 0;
tab->n_con = 0;
+ tab->n_eq = 0;
tab->max_con = n_row;
tab->n_col = n_var;
tab->n_var = n_var;
@@ -944,6 +945,7 @@ static struct isl_tab *add_eq(struct isl_ctx *ctx,
kill_col(ctx, tab, i);
break;
}
+ tab->n_eq++;
return tab;
error:
@@ -1117,7 +1119,7 @@ struct isl_basic_map *isl_basic_map_update_from_tab(struct isl_basic_map *bmap,
if (!tab)
return bmap;
- n_eq = bmap->n_eq;
+ n_eq = tab->n_eq;
if (tab->empty)
bmap = isl_basic_map_set_to_empty(bmap);
else