summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2009-07-11 15:33:25 +0200
committerSven Verdoolaege <skimo@kotnet.org>2009-07-13 23:40:12 +0200
commit7771d25a2aa12e009227fdc209f4a203186815b2 (patch)
tree1d07f52c30a7f5c2fcf21f9f4a7499288878d8aa
parentf67c8d827f8f5d394962bb9cc8f4b6bbb992e1e1 (diff)
downloadisl-7771d25a2aa12e009227fdc209f4a203186815b2.tar.gz
isl-7771d25a2aa12e009227fdc209f4a203186815b2.tar.bz2
isl-7771d25a2aa12e009227fdc209f4a203186815b2.zip
isl_tab_min: use general rollback mechanism
-rw-r--r--isl_tab.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/isl_tab.c b/isl_tab.c
index ac9310a7..cdb950bb 100644
--- a/isl_tab.c
+++ b/isl_tab.c
@@ -1554,10 +1554,12 @@ enum isl_lp_result isl_tab_min(struct isl_ctx *ctx, struct isl_tab *tab,
int r;
enum isl_lp_result res = isl_lp_ok;
struct isl_tab_var *var;
+ struct isl_tab_undo *snap;
if (tab->empty)
return isl_lp_empty;
+ snap = isl_tab_snap(ctx, tab);
r = add_row(ctx, tab, f);
if (r < 0)
return isl_lp_error;
@@ -1575,7 +1577,7 @@ enum isl_lp_result isl_tab_min(struct isl_ctx *ctx, struct isl_tab *tab,
break;
pivot(ctx, tab, row, col);
}
- if (drop_row(ctx, tab, var->index) < 0)
+ if (isl_tab_rollback(ctx, tab, snap) < 0)
return isl_lp_error;
if (ISL_FL_ISSET(flags, ISL_TAB_SAVE_DUAL)) {
int i;