isl_tab_pip.c: add_lexmin_eq: remove misguided optimizations
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Apr 2011 15:09:24 +0000 (17:09 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 19 Apr 2011 12:26:29 +0000 (14:26 +0200)
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 <skimo@kotnet.org>
isl_tab_pip.c

index b63d3b7..4b64667 100644 (file)
@@ -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) {