[polly] r268853 - Update isl to isl-0.17-5-g57dc5ff
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sat May 7 00:41:25 PDT 2016
Author: grosser
Date: Sat May 7 02:41:25 2016
New Revision: 268853
URL: http://llvm.org/viewvc/llvm-project?rev=268853&view=rev
Log:
Update isl to isl-0.17-5-g57dc5ff
This update fixes an assertion in the isl scheduler.
Modified:
polly/trunk/lib/External/isl/GIT_HEAD_ID
polly/trunk/lib/External/isl/doc/manual.pdf
polly/trunk/lib/External/isl/isl_coalesce.c
polly/trunk/lib/External/isl/isl_map_subtract.c
polly/trunk/lib/External/isl/isl_sample.c
polly/trunk/lib/External/isl/isl_tab.c
polly/trunk/lib/External/isl/isl_tab_pip.c
Modified: polly/trunk/lib/External/isl/GIT_HEAD_ID
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/GIT_HEAD_ID?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/GIT_HEAD_ID (original)
+++ polly/trunk/lib/External/isl/GIT_HEAD_ID Sat May 7 02:41:25 2016
@@ -1 +1 @@
-isl-0.17
+isl-0.17-5-g57dc5ff
Modified: polly/trunk/lib/External/isl/doc/manual.pdf
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/doc/manual.pdf?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
Binary files polly/trunk/lib/External/isl/doc/manual.pdf (original) and polly/trunk/lib/External/isl/doc/manual.pdf Sat May 7 02:41:25 2016 differ
Modified: polly/trunk/lib/External/isl/isl_coalesce.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_coalesce.c?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_coalesce.c (original)
+++ polly/trunk/lib/External/isl/isl_coalesce.c Sat May 7 02:41:25 2016
@@ -2190,6 +2190,9 @@ static int add_sub_vars(struct isl_coale
* variable in "tab" to the purely affine expression defined by the element.
* "dim" is the offset in the variables of "tab" where we should
* start considering the elements in "list".
+ *
+ * This function assumes that a sufficient number of rows and
+ * elements in the constraint array are available in the tableau.
*/
static int add_sub_equalities(struct isl_tab *tab,
__isl_keep isl_aff_list *list, int dim)
Modified: polly/trunk/lib/External/isl/isl_map_subtract.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_map_subtract.c?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_map_subtract.c (original)
+++ polly/trunk/lib/External/isl/isl_map_subtract.c Sat May 7 02:41:25 2016
@@ -98,6 +98,10 @@ error:
* The position of the constraint is specified by "c", where
* the equalities of bmap are counted twice, once for the inequality
* that is equal to the equality, and once for its negation.
+ *
+ * Each of these constraints has been added to "tab" before by
+ * tab_add_constraints (and later removed again), so there should
+ * already be a row available for the constraint.
*/
static int tab_add_constraint(struct isl_tab *tab,
__isl_keep isl_basic_map *bmap, int *div_map, int c, int oppose)
Modified: polly/trunk/lib/External/isl/isl_sample.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_sample.c?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_sample.c (original)
+++ polly/trunk/lib/External/isl/isl_sample.c Sat May 7 02:41:25 2016
@@ -209,6 +209,9 @@ static struct isl_mat *initial_basis(str
/* Compute the minimum of the current ("level") basis row over "tab"
* and store the result in position "level" of "min".
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
static enum isl_lp_result compute_min(isl_ctx *ctx, struct isl_tab *tab,
__isl_keep isl_vec *min, int level)
@@ -219,6 +222,9 @@ static enum isl_lp_result compute_min(is
/* Compute the maximum of the current ("level") basis row over "tab"
* and store the result in position "level" of "max".
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
static enum isl_lp_result compute_max(isl_ctx *ctx, struct isl_tab *tab,
__isl_keep isl_vec *max, int level)
Modified: polly/trunk/lib/External/isl/isl_tab.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_tab.c?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_tab.c (original)
+++ polly/trunk/lib/External/isl/isl_tab.c Sat May 7 02:41:25 2016
@@ -1637,6 +1637,9 @@ static int close_row(struct isl_tab *tab
/* Add a constraint to the tableau and allocate a row for it.
* Return the index into the constraint array "con".
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
int isl_tab_allocate_con(struct isl_tab *tab)
{
@@ -1766,6 +1769,9 @@ int isl_tab_allocate_var(struct isl_tab
* of the original variables and needs to be expressed in terms of the
* column variables.
*
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
+ *
* We add each term in turn.
* If r = n/d_r is the current sum and we need to add k x, then
* if x is a column variable, we increase the numerator of
@@ -1860,6 +1866,9 @@ static int drop_col(struct isl_tab *tab,
/* Add inequality "ineq" and check if it conflicts with the
* previously added constraints or if it is obviously redundant.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
int isl_tab_add_ineq(struct isl_tab *tab, isl_int *ineq)
{
@@ -1950,6 +1959,9 @@ static int to_col(struct isl_tab *tab, s
* The equalities can therefore never conflict.
* Adding the equalities is currently only really useful for a later call
* to isl_tab_ineq_type.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
static struct isl_tab *add_eq(struct isl_tab *tab, isl_int *eq)
{
@@ -1992,6 +2004,9 @@ static int row_is_manifestly_zero(struct
}
/* Add an equality that is known to be valid for the given tableau.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
int isl_tab_add_valid_eq(struct isl_tab *tab, isl_int *eq)
{
@@ -2028,6 +2043,12 @@ int isl_tab_add_valid_eq(struct isl_tab
return 0;
}
+/* Add a zero row to "tab" and return the corresponding index
+ * in the constraint array.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
+ */
static int add_zero_row(struct isl_tab *tab)
{
int r;
@@ -2046,6 +2067,10 @@ static int add_zero_row(struct isl_tab *
/* Add equality "eq" and check if it conflicts with the
* previously added constraints or if it is obviously redundant.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
+ * If tab->bmap is set, then two rows are needed instead of one.
*/
int isl_tab_add_eq(struct isl_tab *tab, isl_int *eq)
{
@@ -2171,6 +2196,9 @@ static struct isl_vec *ineq_for_div(stru
*
* If add_ineq is not NULL, then this function is used
* instead of isl_tab_add_ineq to effectively add the inequalities.
+ *
+ * This function assumes that at least two more rows and at least
+ * two more elements in the constraint array are available in the tableau.
*/
static int add_div_constraints(struct isl_tab *tab, unsigned div,
int (*add_ineq)(void *user, isl_int *), void *user)
@@ -3112,6 +3140,9 @@ int isl_tab_is_equality(struct isl_tab *
* If opt_denom is NULL, then *opt is rounded up to the nearest integer.
* The return value reflects the nature of the result (empty, unbounded,
* minimal value returned in *opt).
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
enum isl_lp_result isl_tab_min(struct isl_tab *tab,
isl_int *f, isl_int denom, isl_int *opt, isl_int *opt_denom,
Modified: polly/trunk/lib/External/isl/isl_tab_pip.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_tab_pip.c?rev=268853&r1=268852&r2=268853&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_tab_pip.c (original)
+++ polly/trunk/lib/External/isl/isl_tab_pip.c Sat May 7 02:41:25 2016
@@ -1328,6 +1328,9 @@ static int last_var_col_or_int_par_col(s
* If not, we add the equality as two inequalities.
* In this case, the equality was a pure parameter equality and there
* is no need to resolve any constraint violations.
+ *
+ * This function assumes that at least two more rows and at least
+ * two more elements in the constraint array are available in the tableau.
*/
static struct isl_tab *add_lexmin_valid_eq(struct isl_tab *tab, isl_int *eq)
{
@@ -1385,6 +1388,9 @@ static int is_constant(struct isl_tab *t
* each time checking that they can be satisfied.
* In the end we try to use one of the two constraints to eliminate
* a column.
+ *
+ * This function assumes that at least two more rows and at least
+ * two more elements in the constraint array are available in the tableau.
*/
static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq) WARN_UNUSED;
static int add_lexmin_eq(struct isl_tab *tab, isl_int *eq)
@@ -1461,6 +1467,9 @@ static int add_lexmin_eq(struct isl_tab
/* Add an inequality to the tableau, resolving violations using
* restore_lexmin.
+ *
+ * This function assumes that at least one more row and at least
+ * one more element in the constraint array are available in the tableau.
*/
static struct isl_tab *add_lexmin_ineq(struct isl_tab *tab, isl_int *ineq)
{
@@ -4990,11 +4999,14 @@ static int is_optimal(__isl_keep isl_vec
}
/* Add constraints to "tab" that ensure that any solution is significantly
- * better that that represented by "sol". That is, find the first
+ * better than that represented by "sol". That is, find the first
* relevant (within first n_op) non-zero coefficient and force it (along
* with all previous coefficients) to be zero.
* If the solution is already optimal (all relevant coefficients are zero),
* then just mark the table as empty.
+ *
+ * This function assumes that at least 2 * n_op more rows and at least
+ * 2 * n_op more elements in the constraint array are available in the tableau.
*/
static int force_better_solution(struct isl_tab *tab,
__isl_keep isl_vec *sol, int n_op)
@@ -5213,7 +5225,6 @@ struct isl_tab_lexmin {
isl_ctx *ctx;
struct isl_tab *tab;
};
-typedef struct isl_tab_lexmin isl_tab_lexmin;
/* Free "tl" and return NULL.
*/
@@ -5272,12 +5283,17 @@ int isl_tab_lexmin_dim(__isl_keep isl_ta
__isl_give isl_tab_lexmin *isl_tab_lexmin_add_eq(__isl_take isl_tab_lexmin *tl,
isl_int *eq)
{
+ unsigned n_var;
+
if (!tl || !eq)
return isl_tab_lexmin_free(tl);
- isl_seq_neg(eq, eq, 1 + tl->tab->n_var);
+ if (isl_tab_extend_cons(tl->tab, 2) < 0)
+ return isl_tab_lexmin_free(tl);
+ n_var = tl->tab->n_var;
+ isl_seq_neg(eq, eq, 1 + n_var);
tl->tab = add_lexmin_ineq(tl->tab, eq);
- isl_seq_neg(eq, eq, 1 + tl->tab->n_var);
+ isl_seq_neg(eq, eq, 1 + n_var);
tl->tab = add_lexmin_ineq(tl->tab, eq);
if (!tl->tab)
More information about the llvm-commits
mailing list