mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-27 18:28:14 +00:00
Update isl to isl-0.17-5-g57dc5ff
This update fixes an assertion in the isl scheduler. llvm-svn: 268853
This commit is contained in:
parent
10296c2344
commit
6b49f17764
2
polly/lib/External/isl/GIT_HEAD_ID
vendored
2
polly/lib/External/isl/GIT_HEAD_ID
vendored
@ -1 +1 @@
|
||||
isl-0.17
|
||||
isl-0.17-5-g57dc5ff
|
||||
|
BIN
polly/lib/External/isl/doc/manual.pdf
vendored
BIN
polly/lib/External/isl/doc/manual.pdf
vendored
Binary file not shown.
3
polly/lib/External/isl/isl_coalesce.c
vendored
3
polly/lib/External/isl/isl_coalesce.c
vendored
@ -2190,6 +2190,9 @@ static int add_sub_vars(struct isl_coalesce_info *info,
|
||||
* 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)
|
||||
|
4
polly/lib/External/isl/isl_map_subtract.c
vendored
4
polly/lib/External/isl/isl_map_subtract.c
vendored
@ -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)
|
||||
|
6
polly/lib/External/isl/isl_sample.c
vendored
6
polly/lib/External/isl/isl_sample.c
vendored
@ -209,6 +209,9 @@ static struct isl_mat *initial_basis(struct isl_tab *tab)
|
||||
|
||||
/* 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(isl_ctx *ctx, struct isl_tab *tab,
|
||||
|
||||
/* 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)
|
||||
|
31
polly/lib/External/isl/isl_tab.c
vendored
31
polly/lib/External/isl/isl_tab.c
vendored
@ -1637,6 +1637,9 @@ static int close_row(struct isl_tab *tab, struct isl_tab_var *var)
|
||||
|
||||
/* 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 *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, int col)
|
||||
|
||||
/* 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, struct isl_tab_var *var)
|
||||
* 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 isl_tab *tab, int row)
|
||||
}
|
||||
|
||||
/* 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 *tab, isl_int *eq)
|
||||
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 *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(struct isl_basic_map *bmap, unsigned div)
|
||||
*
|
||||
* 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 *tab, int con)
|
||||
* 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,
|
||||
|
24
polly/lib/External/isl/isl_tab_pip.c
vendored
24
polly/lib/External/isl/isl_tab_pip.c
vendored
@ -1328,6 +1328,9 @@ static int last_var_col_or_int_par_col(struct isl_tab *tab, int row)
|
||||
* 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 *tab, int row)
|
||||
* 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 *tab, isl_int *eq)
|
||||
|
||||
/* 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 *sol, int n_op)
|
||||
}
|
||||
|
||||
/* 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_tab_lexmin *tl)
|
||||
__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)
|
||||
|
Loading…
Reference in New Issue
Block a user