isl_equalities.c: remove unused variable
[platform/upstream/isl.git] / isl_tab.h
index 7dc321c..6c4d947 100644 (file)
--- a/isl_tab.h
+++ b/isl_tab.h
@@ -14,6 +14,7 @@ struct isl_tab_var {
        unsigned is_redundant : 1;
        unsigned marked : 1;
        unsigned frozen : 1;
+       unsigned negated : 1;
 };
 
 enum isl_tab_undo_type {
@@ -28,6 +29,7 @@ enum isl_tab_undo_type {
        isl_tab_undo_bset_eq,
        isl_tab_undo_bset_div,
        isl_tab_undo_saved_basis,
+       isl_tab_undo_drop_sample,
 };
 
 union isl_tab_undo_val {
@@ -65,7 +67,7 @@ struct isl_tab_undo {
  * The big parameter represents an arbitrarily big (and divisible)
  * positive number.  If present, then the sign of a row is determined
  * lexicographically, with the sign of the big parameter coefficient
- * considered first.  The big parameter will only be used while
+ * considered first.  The big parameter is only used while
  * solving PILP problems.
  *
  * The first n_dead column variables have their values fixed to zero.
@@ -83,14 +85,28 @@ struct isl_tab_undo {
  * There are "n_var" variables in total.  The first "n_param" of these
  * are called parameters and the last "n_div" of these are called divs.
  * The basic tableau operations makes no distinction between different
- * kinds of variables.
+ * kinds of variables.  These special variables are only used while
+ * solving PILP problems.
  *
  * Dead columns and redundant rows are detected on the fly.
  * However, the basic operations do not ensure that all dead columns
  * or all redundant rows are detected.
  * isl_tab_detect_equalities and isl_tab_detect_redundant can be used
  * to perform and exhaustive search for dead columns and redundant rows.
+ *
+ * The samples matrix contains "n_sample" integer points that have at some
+ * point been elements satisfying the tableau.  The first "n_outside"
+ * of them no longer satisfy the tableau.  They are kept because they
+ * can be reinstated during rollback when the constraint that cut them
+ * out is removed.  These samples are only maintained for the context
+ * tableau while solving PILP problems.
  */
+enum isl_tab_row_sign {
+       isl_tab_row_unknown = 0,
+       isl_tab_row_pos,
+       isl_tab_row_neg,
+       isl_tab_row_any,
+};
 struct isl_tab {
        struct isl_mat *mat;
 
@@ -110,6 +126,7 @@ struct isl_tab {
        struct isl_tab_var *con;
        int *row_var;   /* v >= 0 -> var v;     v < 0 -> con ~v */
        int *col_var;   /* v >= 0 -> var v;     v < 0 -> con ~v */
+       enum isl_tab_row_sign *row_sign;
 
        struct isl_tab_undo bottom;
        struct isl_tab_undo *top;
@@ -117,6 +134,10 @@ struct isl_tab {
        struct isl_vec *dual;
        struct isl_basic_set *bset;
 
+       unsigned n_sample;
+       unsigned n_outside;
+       struct isl_mat *samples;
+
        unsigned need_undo : 1;
        unsigned rational : 1;
        unsigned empty : 1;
@@ -172,6 +193,10 @@ struct isl_tab *isl_tab_select_facet(struct isl_tab *tab, int con);
 
 void isl_tab_dump(struct isl_tab *tab, FILE *out, int indent);
 
+struct isl_map *isl_tab_basic_map_partial_lexopt(
+               struct isl_basic_map *bmap, struct isl_basic_set *dom,
+               struct isl_set **empty, int max);
+
 /* private */
 
 struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i);
@@ -186,6 +211,7 @@ void isl_tab_pivot(struct isl_tab *tab, int row, int col);
 int isl_tab_add_row(struct isl_tab *tab, isl_int *line);
 int isl_tab_row_is_redundant(struct isl_tab *tab, int row);
 int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var);
+int isl_tab_kill_col(struct isl_tab *tab, int col);
 
 void isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type);
 void isl_tab_push_var(struct isl_tab *tab,