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>
} 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) {