From ab692eed4db36bf525a8d82bc4670ffbd42955a9 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 15 Apr 2011 17:09:24 +0200 Subject: [PATCH] isl_tab_pip.c: add_lexmin_eq: remove misguided optimizations After adding a pair of inequalities corresponding to the equality, the code tries to reduce the dimensionality of the problem by removing a column. If one of the added constraints happens to have been pivoted into a column, then it can easily be removed. Otherwise, the code tries to pivot the row into a column and then remove the column. This pivot may disrupt the lexico-positiveness of the columns however. At the first least, the code should check that the pivot entry is negative, but it should also avoid pivoting out a column corresponding to a parameter. Since this optimization shouldn't have that much of an effect anyway, we choose here to just remove it for now. Signed-off-by: Sven Verdoolaege --- isl_tab_pip.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/isl_tab_pip.c b/isl_tab_pip.c index b63d3b7..4b64667 100644 --- a/isl_tab_pip.c +++ b/isl_tab_pip.c @@ -1307,18 +1307,6 @@ static struct isl_tab *add_lexmin_eq(struct isl_tab *tab, isl_int *eq) } else if (!tab->con[r2].is_row) { if (isl_tab_kill_col(tab, tab->con[r2].index) < 0) goto error; - } else if (isl_int_is_zero(tab->mat->row[tab->con[r1].index][1])) { - unsigned off = 2 + tab->M; - int i; - int row = tab->con[r1].index; - i = isl_seq_first_non_zero(tab->mat->row[row]+off+tab->n_dead, - tab->n_col - tab->n_dead); - if (i != -1) { - if (isl_tab_pivot(tab, row, tab->n_dead + i) < 0) - goto error; - if (isl_tab_kill_col(tab, tab->n_dead + i) < 0) - goto error; - } } if (tab->bmap) { -- 2.7.4