isl_tab_pip: don't simplify domain in isl_for_add
[platform/upstream/isl.git] / isl_tab_pip.c
index 421a49f..56eb161 100644 (file)
@@ -10,6 +10,7 @@
  * ZAC des vignes, 4 rue Jacques Monod, 91893 Orsay, France 
  */
 
+#include <isl_ctx_private.h>
 #include "isl_map_private.h"
 #include <isl/seq.h>
 #include "isl_tab.h"
@@ -39,7 +40,7 @@
  * then the initial sample value may be chosen equal to zero.
  * However, we will not make this assumption.  Instead, we apply
  * the "big parameter" trick.  Any variable x is then not directly
- * used in the tableau, but instead it its represented by another
+ * used in the tableau, but instead it is represented by another
  * variable x' = M + x, where M is an arbitrarily large (positive)
  * value.  x' is therefore always non-negative, whatever the value of x.
  * Taking as initial sample value x' = 0 corresponds to x = -M,
@@ -1306,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) {
@@ -4265,7 +4254,7 @@ static __isl_give isl_map *basic_map_partial_lexopt(
  *
  *     a x >= -u >= -b_i(p)
  *
- * Moreover, m = min_i(b_i(p)) satisfied the constraints on u and can
+ * Moreover, m = min_i(b_i(p)) satisfies the constraints on u and can
  * therefore be plugged into the solution.
  */
 static __isl_give isl_map *basic_map_partial_lexopt_symm(
@@ -4481,7 +4470,6 @@ static void sol_for_add(struct isl_sol_for *sol,
        if (sol->sol.error || !dom || !M)
                goto error;
 
-       dom = isl_basic_set_simplify(dom);
        dom = isl_basic_set_finalize(dom);
 
        if (sol->fn(isl_basic_set_copy(dom), isl_mat_copy(M), sol->user) < 0)