diff options
Diffstat (limited to 'polly/lib')
-rw-r--r-- | polly/lib/External/isl/GIT_HEAD_ID | 2 | ||||
-rw-r--r-- | polly/lib/External/isl/include/isl/constraint.h | 4 | ||||
-rw-r--r-- | polly/lib/External/isl/include/isl/map.h | 15 | ||||
-rw-r--r-- | polly/lib/External/isl/include/isl/set.h | 14 | ||||
-rw-r--r-- | polly/lib/External/isl/include/isl/space.h | 3 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_affine_hull.c | 26 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_constraint.c | 65 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_map.c | 337 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_map_private.h | 18 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_map_simplify.c | 66 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_scheduler.c | 48 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_space.c | 27 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_space_private.h | 4 | ||||
-rw-r--r-- | polly/lib/External/isl/isl_tab_pip.c | 8 |
14 files changed, 36 insertions, 601 deletions
diff --git a/polly/lib/External/isl/GIT_HEAD_ID b/polly/lib/External/isl/GIT_HEAD_ID index 463d02d7e27..7ddd3d79374 100644 --- a/polly/lib/External/isl/GIT_HEAD_ID +++ b/polly/lib/External/isl/GIT_HEAD_ID @@ -1 +1 @@ -isl-0.18-304-g1efe43d +isl-0.18-336-g1e193d9 diff --git a/polly/lib/External/isl/include/isl/constraint.h b/polly/lib/External/isl/include/isl/constraint.h index a12ba13f891..84cadeb1f6e 100644 --- a/polly/lib/External/isl/include/isl/constraint.h +++ b/polly/lib/External/isl/include/isl/constraint.h @@ -131,10 +131,6 @@ __isl_give isl_aff *isl_constraint_get_aff( __isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff); __isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff); -ISL_DEPRECATED -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); - int isl_constraint_plain_cmp(__isl_keep isl_constraint *c1, __isl_keep isl_constraint *c2); int isl_constraint_cmp_last_non_zero(__isl_keep isl_constraint *c1, diff --git a/polly/lib/External/isl/include/isl/map.h b/polly/lib/External/isl/include/isl/map.h index a8a86e3d814..50443a01145 100644 --- a/polly/lib/External/isl/include/isl/map.h +++ b/polly/lib/External/isl/include/isl/map.h @@ -188,9 +188,6 @@ __isl_give isl_basic_map *isl_basic_map_remove_dims( __isl_give isl_basic_map *isl_basic_map_eliminate( __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned first, unsigned n); -ISL_DEPRECATED -__isl_give isl_basic_map *isl_basic_map_from_basic_set( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim); __isl_export __isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap); __isl_export @@ -275,12 +272,6 @@ __isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff( void isl_basic_map_print_internal(__isl_keep isl_basic_map *bmap, FILE *out, int indent); -ISL_DEPRECATED -struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map); -ISL_DEPRECATED -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap); - __isl_give isl_val *isl_basic_map_plain_get_val_if_fixed( __isl_keep isl_basic_map *bmap, enum isl_dim_type type, unsigned pos); @@ -519,9 +510,6 @@ __isl_give isl_basic_map *isl_basic_map_from_domain_and_range( __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range); __isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, __isl_take isl_set *range); -ISL_DEPRECATED -__isl_give isl_map *isl_map_from_set(__isl_take isl_set *set, - __isl_take isl_space *dim); __isl_export __isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map); @@ -630,9 +618,6 @@ __isl_export isl_stat isl_map_foreach_basic_map(__isl_keep isl_map *map, isl_stat (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user); -ISL_DEPRECATED -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set); - __isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map, __isl_take isl_val *exp); __isl_give isl_map *isl_map_power(__isl_take isl_map *map, int *exact); diff --git a/polly/lib/External/isl/include/isl/set.h b/polly/lib/External/isl/include/isl/set.h index 57b8335dd77..b0980d16241 100644 --- a/polly/lib/External/isl/include/isl/set.h +++ b/polly/lib/External/isl/include/isl/set.h @@ -127,9 +127,6 @@ __isl_give isl_basic_set *isl_basic_set_remove_redundancies( __isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set); __isl_give isl_basic_set *isl_basic_set_list_intersect( __isl_take struct isl_basic_set_list *list); -ISL_DEPRECATED -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list); __isl_give isl_set *isl_set_list_union(__isl_take isl_set_list *list); @@ -262,8 +259,6 @@ __isl_give isl_basic_set *isl_set_plain_unshifted_simple_hull( __isl_give isl_basic_set *isl_set_unshifted_simple_hull_from_set_list( __isl_take isl_set *set, __isl_take isl_set_list *list); struct isl_basic_set *isl_set_bounded_simple_hull(struct isl_set *set); -ISL_DEPRECATED -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set); struct isl_set *isl_set_union_disjoint( struct isl_set *set1, struct isl_set *set2); @@ -402,12 +397,6 @@ struct isl_set *isl_basic_set_compute_divs(struct isl_basic_set *bset); __isl_give isl_set *isl_set_compute_divs(__isl_take isl_set *set); __isl_give isl_set *isl_set_align_divs(__isl_take isl_set *set); -ISL_DEPRECATED -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set); -ISL_DEPRECATED -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset); - __isl_give isl_val *isl_set_plain_get_val_if_fixed(__isl_keep isl_set *set, enum isl_dim_type type, unsigned pos); isl_bool isl_set_dim_is_bounded(__isl_keep isl_set *set, @@ -445,9 +434,6 @@ isl_bool isl_set_plain_is_disjoint(__isl_keep isl_set *set1, uint32_t isl_set_get_hash(struct isl_set *set); -ISL_DEPRECATED -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim); - int isl_set_n_basic_set(__isl_keep isl_set *set); __isl_export isl_stat isl_set_foreach_basic_set(__isl_keep isl_set *set, diff --git a/polly/lib/External/isl/include/isl/space.h b/polly/lib/External/isl/include/isl/space.h index 5721fa583ff..19e068cceb6 100644 --- a/polly/lib/External/isl/include/isl/space.h +++ b/polly/lib/External/isl/include/isl/space.h @@ -163,9 +163,6 @@ isl_bool isl_space_match(__isl_keep isl_space *space1, enum isl_dim_type type1, ISL_DEPRECATED int isl_space_tuple_match(__isl_keep isl_space *space1, enum isl_dim_type type1, __isl_keep isl_space *space2, enum isl_dim_type type2); -ISL_DEPRECATED -int isl_space_compatible(__isl_keep isl_space *dim1, - __isl_keep isl_space *dim2); unsigned isl_space_dim(__isl_keep isl_space *dim, enum isl_dim_type type); __isl_give char *isl_space_to_str(__isl_keep isl_space *space); diff --git a/polly/lib/External/isl/isl_affine_hull.c b/polly/lib/External/isl/isl_affine_hull.c index 148dcb2b581..27e54ca7619 100644 --- a/polly/lib/External/isl/isl_affine_hull.c +++ b/polly/lib/External/isl/isl_affine_hull.c @@ -338,32 +338,6 @@ error: return NULL; } -__isl_give isl_set *isl_set_recession_cone(__isl_take isl_set *set) -{ - int i; - - if (!set) - return NULL; - if (set->n == 0) - return set; - - set = isl_set_remove_divs(set); - set = isl_set_cow(set); - if (!set) - return NULL; - - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_recession_cone(set->p[i]); - if (!set->p[i]) - goto error; - } - - return set; -error: - isl_set_free(set); - return NULL; -} - /* Move "sample" to a point that is one up (or down) from the original * point in dimension "pos". */ diff --git a/polly/lib/External/isl/isl_constraint.c b/polly/lib/External/isl/isl_constraint.c index eca62521d9f..89db4a1fe8c 100644 --- a/polly/lib/External/isl/isl_constraint.c +++ b/polly/lib/External/isl/isl_constraint.c @@ -670,71 +670,6 @@ __isl_give isl_constraint *isl_constraint_set_coefficient_si( return constraint; } -/* Drop any constraint from "bset" that is identical to "constraint". - * In particular, this means that the local spaces of "bset" and - * "constraint" need to be the same. - * - * We manually set ISL_BASIC_SET_FINAL instead of calling - * isl_basic_set_finalize because this function is called by CLooG, - * which does not expect any variables to disappear. - */ -__isl_give isl_basic_set *isl_basic_set_drop_constraint( - __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint) -{ - int i; - unsigned n; - isl_int **row; - unsigned total; - isl_local_space *ls1; - int equal; - int equality; - - if (!bset || !constraint) - goto error; - - ls1 = isl_basic_set_get_local_space(bset); - equal = isl_local_space_is_equal(ls1, constraint->ls); - isl_local_space_free(ls1); - if (equal < 0) - goto error; - if (!equal) { - isl_constraint_free(constraint); - return bset; - } - - bset = isl_basic_set_cow(bset); - if (!bset) - goto error; - - equality = isl_constraint_is_equality(constraint); - if (equality) { - n = bset->n_eq; - row = bset->eq; - } else { - n = bset->n_ineq; - row = bset->ineq; - } - - total = isl_constraint_dim(constraint, isl_dim_all); - for (i = 0; i < n; ++i) { - if (!isl_seq_eq(row[i], constraint->v->el, 1 + total)) - continue; - if (equality && isl_basic_set_drop_equality(bset, i) < 0) - goto error; - if (!equality && isl_basic_set_drop_inequality(bset, i) < 0) - goto error; - break; - } - - isl_constraint_free(constraint); - ISL_F_SET(bset, ISL_BASIC_SET_FINAL); - return bset; -error: - isl_constraint_free(constraint); - isl_basic_set_free(bset); - return NULL; -} - struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint) { isl_ctx *ctx; diff --git a/polly/lib/External/isl/isl_map.c b/polly/lib/External/isl/isl_map.c index b2f3b77ea2a..335f90b6afb 100644 --- a/polly/lib/External/isl/isl_map.c +++ b/polly/lib/External/isl/isl_map.c @@ -1325,11 +1325,6 @@ int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos) return 0; } -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos) -{ - return isl_basic_map_drop_equality(bset_to_bmap(bset), pos); -} - /* Turn inequality "pos" of "bmap" into an equality. * * In particular, we move the inequality in front of the equalities @@ -1545,11 +1540,6 @@ isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n) return isl_stat_ok; } -isl_stat isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n) -{ - return isl_basic_map_free_div(bset_to_bmap(bset), n); -} - /* Copy constraint from src to dst, putting the vars of src at offset * dim_off in dst and the divs of src at offset div_off in dst. * If both sets are actually map, then dim_off applies to the input @@ -2652,13 +2642,6 @@ isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div) return isl_bool_true; } -/* Does local variable "div" of "bset" have a complete explicit representation? - */ -isl_bool isl_basic_set_div_is_known(__isl_keep isl_basic_set *bset, int div) -{ - return isl_basic_map_div_is_known(bset, div); -} - /* Remove all divs that are unknown or defined in terms of unknown divs. */ __isl_give isl_basic_map *isl_basic_map_remove_unknown_divs( @@ -2942,20 +2925,6 @@ error: return NULL; } -struct isl_set *isl_set_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags) -{ - struct isl_set *set; - isl_space *dims; - - dims = isl_space_alloc(ctx, nparam, 0, dim); - if (!dims) - return NULL; - - set = isl_set_alloc_space(dims, n, flags); - return set; -} - /* Make sure "map" has room for at least "n" more basic maps. */ struct isl_map *isl_map_grow(struct isl_map *map, int n) @@ -2992,22 +2961,6 @@ struct isl_set *isl_set_grow(struct isl_set *set, int n) return set_from_map(isl_map_grow(set_to_map(set), n)); } -struct isl_set *isl_set_dup(struct isl_set *set) -{ - int i; - struct isl_set *dup; - - if (!set) - return NULL; - - dup = isl_set_alloc_space(isl_space_copy(set->dim), set->n, set->flags); - if (!dup) - return NULL; - for (i = 0; i < set->n; ++i) - dup = isl_set_add_basic_set(dup, isl_basic_set_copy(set->p[i])); - return dup; -} - struct isl_set *isl_set_from_basic_set(struct isl_basic_set *bset) { return isl_map_from_basic_map(bset); @@ -4793,33 +4746,6 @@ __isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, return map; } -static __isl_give isl_basic_map *basic_map_from_basic_set( - __isl_take isl_basic_set *bset, __isl_take isl_space *dim) -{ - struct isl_basic_map *bmap; - - bset = isl_basic_set_cow(bset); - if (!bset || !dim) - goto error; - - isl_assert(bset->ctx, isl_space_compatible_internal(bset->dim, dim), - goto error); - isl_space_free(bset->dim); - bmap = bset_to_bmap(bset); - bmap->dim = dim; - return isl_basic_map_finalize(bmap); -error: - isl_basic_set_free(bset); - isl_space_free(dim); - return NULL; -} - -__isl_give isl_basic_map *isl_basic_map_from_basic_set( - __isl_take isl_basic_set *bset, __isl_take isl_space *space) -{ - return basic_map_from_basic_set(bset, space); -} - /* For a div d = floor(f/m), add the constraint * * f - m d >= 0 @@ -5494,33 +5420,6 @@ __isl_give isl_map *isl_set_wrapped_domain_map(__isl_take isl_set *set) return map; } -__isl_give isl_map *isl_map_from_set(__isl_take isl_set *set, - __isl_take isl_space *dim) -{ - int i; - struct isl_map *map = NULL; - - set = isl_set_cow(set); - if (!set || !dim) - goto error; - isl_assert(set->ctx, isl_space_compatible_internal(set->dim, dim), - goto error); - map = set_to_map(set); - for (i = 0; i < set->n; ++i) { - map->p[i] = basic_map_from_basic_set( - set->p[i], isl_space_copy(dim)); - if (!map->p[i]) - goto error; - } - isl_space_free(map->dim); - map->dim = dim; - return map; -error: - isl_space_free(dim); - isl_set_free(set); - return NULL; -} - __isl_give isl_basic_map *isl_basic_map_from_domain( __isl_take isl_basic_set *bset) { @@ -5604,21 +5503,6 @@ error: return NULL; } -struct isl_map *isl_map_alloc(struct isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, - unsigned flags) -{ - struct isl_map *map; - isl_space *dims; - - dims = isl_space_alloc(ctx, nparam, in, out); - if (!dims) - return NULL; - - map = isl_map_alloc_space(dims, n, flags); - return map; -} - __isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *dim) { struct isl_basic_map *bmap; @@ -8550,13 +8434,6 @@ __isl_give isl_basic_map *isl_basic_map_align_divs( return dst; } -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src) -{ - return bset_from_bmap(isl_basic_map_align_divs(bset_to_bmap(dst), - bset_to_bmap(src))); -} - struct isl_map *isl_map_align_divs(struct isl_map *map) { int i; @@ -8687,66 +8564,6 @@ struct isl_set *isl_set_remove_empty_parts(struct isl_set *set) return set_from_map(isl_map_remove_empty_parts(set_to_map(set))); } -static __isl_give isl_basic_map *map_copy_basic_map(__isl_keep isl_map *map) -{ - struct isl_basic_map *bmap; - if (!map || map->n == 0) - return NULL; - bmap = map->p[map->n-1]; - isl_assert(map->ctx, ISL_F_ISSET(bmap, ISL_BASIC_SET_FINAL), return NULL); - return isl_basic_map_copy(bmap); -} - -__isl_give isl_basic_map *isl_map_copy_basic_map(__isl_keep isl_map *map) -{ - return map_copy_basic_map(map); -} - -struct isl_basic_set *isl_set_copy_basic_set(struct isl_set *set) -{ - return bset_from_bmap(map_copy_basic_map(set_to_map(set))); -} - -static __isl_give isl_map *map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap) -{ - int i; - - if (!map || !bmap) - goto error; - for (i = map->n-1; i >= 0; --i) { - if (map->p[i] != bmap) - continue; - map = isl_map_cow(map); - if (!map) - goto error; - isl_basic_map_free(map->p[i]); - if (i != map->n-1) { - ISL_F_CLR(map, ISL_SET_NORMALIZED); - map->p[i] = map->p[map->n-1]; - } - map->n--; - return map; - } - return map; -error: - isl_map_free(map); - return NULL; -} - -__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map, - __isl_keep isl_basic_map *bmap) -{ - return map_drop_basic_map(map, bmap); -} - -struct isl_set *isl_set_drop_basic_set(struct isl_set *set, - struct isl_basic_set *bset) -{ - return set_from_map(map_drop_basic_map(set_to_map(set), - bset_to_bmap(bset))); -} - /* Given two basic sets bset1 and bset2, compute the maximal difference * between the values of dimension pos in bset1 and those in bset2 * for any common value of the parameters and dimensions preceding pos. @@ -9166,12 +8983,6 @@ struct isl_basic_map *isl_basic_map_normalize(struct isl_basic_map *bmap) ISL_F_SET(bmap, ISL_BASIC_MAP_NORMALIZED); return bmap; } - -struct isl_basic_set *isl_basic_set_normalize(struct isl_basic_set *bset) -{ - return bset_from_bmap(isl_basic_map_normalize(bset_to_bmap(bset))); -} - int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1, __isl_keep isl_basic_map *bmap2) { @@ -9536,55 +9347,6 @@ error: return NULL; } -/* Return the Cartesian product of the basic sets in list (in the given order). - */ -__isl_give isl_basic_set *isl_basic_set_list_product( - __isl_take struct isl_basic_set_list *list) -{ - int i; - unsigned dim; - unsigned nparam; - unsigned extra; - unsigned n_eq; - unsigned n_ineq; - struct isl_basic_set *product = NULL; - - if (!list) - goto error; - isl_assert(list->ctx, list->n > 0, goto error); - isl_assert(list->ctx, list->p[0], goto error); - nparam = isl_basic_set_n_param(list->p[0]); - dim = isl_basic_set_n_dim(list->p[0]); - extra = list->p[0]->n_div; - n_eq = list->p[0]->n_eq; - n_ineq = list->p[0]->n_ineq; - for (i = 1; i < list->n; ++i) { - isl_assert(list->ctx, list->p[i], goto error); - isl_assert(list->ctx, - nparam == isl_basic_set_n_param(list->p[i]), goto error); - dim += isl_basic_set_n_dim(list->p[i]); - extra += list->p[i]->n_div; - n_eq += list->p[i]->n_eq; - n_ineq += list->p[i]->n_ineq; - } - product = isl_basic_set_alloc(list->ctx, nparam, dim, extra, - n_eq, n_ineq); - if (!product) - goto error; - dim = 0; - for (i = 0; i < list->n; ++i) { - isl_basic_set_add_constraints(product, - isl_basic_set_copy(list->p[i]), dim); - dim += isl_basic_set_n_dim(list->p[i]); - } - isl_basic_set_list_free(list); - return product; -error: - isl_basic_set_free(product); - isl_basic_set_list_free(list); - return NULL; -} - struct isl_basic_map *isl_basic_map_product( struct isl_basic_map *bmap1, struct isl_basic_map *bmap2) { @@ -10133,44 +9895,6 @@ uint32_t isl_set_get_hash(__isl_keep isl_set *set) return isl_map_get_hash(set_to_map(set)); } -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality. - */ -int isl_basic_set_dim_is_unique(struct isl_basic_set *bset, unsigned dim) -{ - int i; - unsigned nparam; - - if (!bset) - return -1; - nparam = isl_basic_set_n_param(bset); - for (i = 0; i < bset->n_eq; ++i) - if (!isl_int_is_zero(bset->eq[i][1 + nparam + dim])) - return 1; - return 0; -} - -/* Check if the value for dimension dim is completely determined - * by the values of the other parameters and variables. - * That is, check if dimension dim is involved in an equality - * for each of the subsets. - */ -int isl_set_dim_is_unique(struct isl_set *set, unsigned dim) -{ - int i; - - if (!set) - return -1; - for (i = 0; i < set->n; ++i) { - int unique; - unique = isl_basic_set_dim_is_unique(set->p[i], dim); - if (unique != 1) - return unique; - } - return 1; -} - /* Return the number of basic maps in the (current) representation of "map". */ int isl_map_n_basic_map(__isl_keep isl_map *map) @@ -10298,67 +10022,6 @@ error: return NULL; } -__isl_give isl_map *isl_set_lifting(__isl_take isl_set *set) -{ - isl_space *dim; - struct isl_basic_map *bmap; - unsigned n_set; - unsigned n_div; - unsigned n_param; - unsigned total; - int i, k, l; - - set = isl_set_align_divs(set); - - if (!set) - return NULL; - - dim = isl_set_get_space(set); - if (set->n == 0 || set->p[0]->n_div == 0) { - isl_set_free(set); - return isl_map_identity(isl_space_map_from_set(dim)); - } - - n_div = set->p[0]->n_div; - dim = isl_space_map_from_set(dim); - n_param = isl_space_dim(dim, isl_dim_param); - n_set = isl_space_dim(dim, isl_dim_in); - dim = isl_space_extend(dim, n_param, n_set, n_set + n_div); - bmap = isl_basic_map_alloc_space(dim, 0, n_set, 2 * n_div); - for (i = 0; i < n_set; ++i) - bmap = var_equal(bmap, i); - - total = n_param + n_set + n_set + n_div; - for (i = 0; i < n_div; ++i) { - k = isl_basic_map_alloc_inequality(bmap); - if (k < 0) - goto error; - isl_seq_cpy(bmap->ineq[k], set->p[0]->div[i]+1, 1+n_param); - isl_seq_clr(bmap->ineq[k]+1+n_param, n_set); - isl_seq_cpy(bmap->ineq[k]+1+n_param+n_set, - set->p[0]->div[i]+1+1+n_param, n_set + n_div); - isl_int_neg(bmap->ineq[k][1+n_param+n_set+n_set+i], - set->p[0]->div[i][0]); - - l = isl_basic_map_alloc_inequality(bmap); - if (l < 0) - goto error; - isl_seq_neg(bmap->ineq[l], bmap->ineq[k], 1 + total); - isl_int_add(bmap->ineq[l][0], bmap->ineq[l][0], - set->p[0]->div[i][0]); - isl_int_sub_ui(bmap->ineq[l][0], bmap->ineq[l][0], 1); - } - - isl_set_free(set); - bmap = isl_basic_map_simplify(bmap); - bmap = isl_basic_map_finalize(bmap); - return isl_map_from_basic_map(bmap); -error: - isl_set_free(set); - isl_basic_map_free(bmap); - return NULL; -} - int isl_basic_set_size(__isl_keep isl_basic_set *bset) { unsigned dim; diff --git a/polly/lib/External/isl/isl_map_private.h b/polly/lib/External/isl/isl_map_private.h index 521c067c0bc..adde1c0bed8 100644 --- a/polly/lib/External/isl/isl_map_private.h +++ b/polly/lib/External/isl/isl_map_private.h @@ -146,19 +146,12 @@ __isl_give isl_basic_map *isl_basic_map_extend_constraints( __isl_give isl_basic_map *isl_basic_map_simplify( __isl_take isl_basic_map *bmap); -__isl_give isl_set *isl_set_alloc(isl_ctx *ctx, - unsigned nparam, unsigned dim, int n, unsigned flags); __isl_give isl_set *isl_set_add_basic_set(__isl_take isl_set *set, __isl_take isl_basic_set *bset); -__isl_give isl_set *isl_set_finalize(__isl_take isl_set *set); -__isl_give isl_set *isl_set_dup(__isl_keep isl_set *set); -__isl_give isl_map *isl_map_alloc(isl_ctx *ctx, - unsigned nparam, unsigned in, unsigned out, int n, unsigned flags); __isl_give isl_map *isl_map_add_basic_map(__isl_take isl_map *map, __isl_take isl_basic_map *bmap); __isl_give isl_map *isl_map_dup(__isl_keep isl_map *map); -__isl_give isl_map *isl_map_finalize(__isl_take isl_map *map); __isl_give isl_basic_set *isl_basic_set_from_underlying_set( __isl_take isl_basic_set *bset, __isl_take isl_basic_set *like); @@ -231,13 +224,11 @@ __isl_give isl_basic_map *isl_basic_map_insert_div( __isl_take isl_basic_map *bmap, int pos, __isl_keep isl_vec *div); int isl_basic_set_alloc_div(struct isl_basic_set *bset); isl_stat isl_basic_map_free_div(struct isl_basic_map *bmap, unsigned n); -isl_stat isl_basic_set_free_div(struct isl_basic_set *bset, unsigned n); __isl_give isl_basic_map *isl_basic_map_drop_div( __isl_take isl_basic_map *bmap, unsigned div); void isl_basic_map_inequality_to_equality( struct isl_basic_map *bmap, unsigned pos); int isl_basic_map_drop_equality(struct isl_basic_map *bmap, unsigned pos); -int isl_basic_set_drop_equality(struct isl_basic_set *bset, unsigned pos); int isl_basic_set_drop_inequality(struct isl_basic_set *bset, unsigned pos); int isl_basic_map_drop_inequality(struct isl_basic_map *bmap, unsigned pos); __isl_give isl_basic_set *isl_basic_set_add_eq(__isl_take isl_basic_set *bset, @@ -273,8 +264,6 @@ struct isl_basic_map *isl_basic_map_order_divs(struct isl_basic_map *bmap); __isl_give isl_map *isl_map_order_divs(__isl_take isl_map *map); struct isl_basic_map *isl_basic_map_align_divs( struct isl_basic_map *dst, struct isl_basic_map *src); -struct isl_basic_set *isl_basic_set_align_divs( - struct isl_basic_set *dst, struct isl_basic_set *src); __isl_give isl_map *isl_map_align_divs_to_basic_map_list( __isl_take isl_map *map, __isl_keep isl_basic_map_list *list); __isl_give isl_basic_map_list *isl_basic_map_list_align_divs_to_basic_map( @@ -362,8 +351,6 @@ __isl_give isl_basic_map *isl_basic_map_add_known_div_constraints( __isl_take isl_basic_map *bmap); struct isl_basic_map *isl_basic_map_drop_redundant_divs( struct isl_basic_map *bmap); -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset); struct isl_basic_set *isl_basic_set_recession_cone(struct isl_basic_set *bset); struct isl_basic_set *isl_basic_set_lineality_space(struct isl_basic_set *bset); @@ -432,7 +419,6 @@ __isl_give isl_basic_map *isl_basic_map_mark_div_unknown( __isl_take isl_basic_map *bmap, int div); isl_bool isl_basic_map_div_is_marked_unknown(__isl_keep isl_basic_map *bmap, int div); -isl_bool isl_basic_set_div_is_known(__isl_keep isl_basic_set *bset, int div); isl_bool isl_basic_map_div_is_known(__isl_keep isl_basic_map *bmap, int div); int isl_basic_set_first_unknown_div(__isl_keep isl_basic_set *bset); int isl_basic_map_first_unknown_div(__isl_keep isl_basic_map *bmap); @@ -456,10 +442,6 @@ isl_stat isl_basic_map_foreach_lexopt(__isl_keep isl_basic_map *bmap, int max, isl_stat (*fn)(__isl_take isl_basic_set *dom, __isl_take isl_aff_list *list, void *user), void *user); -isl_stat isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max, - isl_stat (*fn)(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user), - void *user); __isl_give isl_set *isl_set_substitute(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, __isl_keep isl_aff *subs); diff --git a/polly/lib/External/isl/isl_map_simplify.c b/polly/lib/External/isl/isl_map_simplify.c index 86e38b54f1a..765fbf7cde2 100644 --- a/polly/lib/External/isl/isl_map_simplify.c +++ b/polly/lib/External/isl/isl_map_simplify.c @@ -1740,42 +1740,6 @@ struct isl_basic_set *isl_basic_set_finalize(struct isl_basic_set *bset) return bset_from_bmap(isl_basic_map_finalize(bset_to_bmap(bset))); } -struct isl_set *isl_set_finalize(struct isl_set *set) -{ - int i; - - if (!set) - return NULL; - for (i = 0; i < set->n; ++i) { - set->p[i] = isl_basic_set_finalize(set->p[i]); - if (!set->p[i]) - goto error; - } - return set; -error: - isl_set_free(set); - return NULL; -} - -struct isl_map *isl_map_finalize(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_finalize(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - - /* Remove definition of any div that is defined in terms of the given variable. * The div itself is not removed. Functions such as * eliminate_divs_ineq depend on the other divs remaining in place. @@ -5220,36 +5184,6 @@ __isl_give isl_basic_map *isl_basic_map_drop_redundant_divs( return isl_basic_map_drop_redundant_divs(bmap); } -struct isl_basic_set *isl_basic_set_drop_redundant_divs( - struct isl_basic_set *bset) -{ - isl_basic_map *bmap = bset_to_bmap(bset); - return bset_from_bmap(isl_basic_map_drop_redundant_divs(bmap)); -} - -struct isl_map *isl_map_drop_redundant_divs(struct isl_map *map) -{ - int i; - - if (!map) - return NULL; - for (i = 0; i < map->n; ++i) { - map->p[i] = isl_basic_map_drop_redundant_divs(map->p[i]); - if (!map->p[i]) - goto error; - } - ISL_F_CLR(map, ISL_MAP_NORMALIZED); - return map; -error: - isl_map_free(map); - return NULL; -} - -struct isl_set *isl_set_drop_redundant_divs(struct isl_set *set) -{ - return set_from_map(isl_map_drop_redundant_divs(set_to_map(set))); -} - /* Does "bmap" satisfy any equality that involves more than 2 variables * and/or has coefficients different from -1 and 1? */ diff --git a/polly/lib/External/isl/isl_scheduler.c b/polly/lib/External/isl/isl_scheduler.c index 46da9c6326d..fdc4e13b941 100644 --- a/polly/lib/External/isl/isl_scheduler.c +++ b/polly/lib/External/isl/isl_scheduler.c @@ -3614,8 +3614,29 @@ static isl_stat count_all_constraints(struct isl_sched_graph *graph, return isl_stat_ok; } +/* Return the total number of (validity) edges that carry_dependences will + * attempt to carry. + */ +static int count_carry_edges(struct isl_sched_graph *graph) +{ + int i; + int n_edge; + + n_edge = 0; + for (i = 0; i < graph->n_edge; ++i) { + struct isl_sched_edge *edge = &graph->edge[i]; + + if (!is_any_validity(edge)) + continue; + + n_edge += isl_map_n_basic_map(edge->map); + } + + return n_edge; +} + /* Construct an LP problem for finding schedule coefficients - * such that the schedule carries as many dependences as possible. + * such that the schedule carries as many validity dependences as possible. * In particular, for each dependence i, we bound the dependence distance * from below by e_i, with 0 <= e_i <= 1 and then maximize the sum * of all e_i's. Dependences with e_i = 0 in the solution are simply @@ -3625,6 +3646,7 @@ static isl_stat count_all_constraints(struct isl_sched_graph *graph, * be possible to carry the dependences expressed by some of those * basic maps and not all of them. * Below, we consider each of those basic maps as a separate "edge". + * "n_edge" is the number of these edges. * * All variables of the LP are non-negative. The actual coefficients * may be negative, so each coefficient is represented as the difference @@ -3646,18 +3668,14 @@ static isl_stat count_all_constraints(struct isl_sched_graph *graph, * The constraints are those from the (validity) edges plus three equalities * to express the sums and n_edge inequalities to express e_i <= 1. */ -static isl_stat setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph) +static isl_stat setup_carry_lp(isl_ctx *ctx, struct isl_sched_graph *graph, + int n_edge) { int i; int k; isl_space *dim; unsigned total; int n_eq, n_ineq; - int n_edge; - - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - n_edge += graph->edge[i].map->n; total = 3 + n_edge; for (i = 0; i < graph->n; ++i) { @@ -4099,9 +4117,14 @@ error: return NULL; } -/* Construct a schedule row for each node such that as many dependences +/* Construct a schedule row for each node such that as many validity dependences * as possible are carried and then continue with the next band. * + * If there are no validity dependences, then no dependence can be carried and + * the procedure is guaranteed to fail. If there is more than one component, + * then try computing a schedule on each component separately + * to prevent or at least postpone this failure. + * * If the computed schedule row turns out to be trivial on one or * more nodes where it should not be trivial, then we throw it away * and try again on each component separately. @@ -4122,7 +4145,6 @@ error: static __isl_give isl_schedule_node *carry_dependences( __isl_take isl_schedule_node *node, struct isl_sched_graph *graph) { - int i; int n_edge; int trivial; isl_ctx *ctx; @@ -4132,12 +4154,12 @@ static __isl_give isl_schedule_node *carry_dependences( if (!node) return NULL; - n_edge = 0; - for (i = 0; i < graph->n_edge; ++i) - n_edge += graph->edge[i].map->n; + n_edge = count_carry_edges(graph); + if (n_edge == 0 && graph->scc > 1) + return compute_component_schedule(node, graph, 1); ctx = isl_schedule_node_get_ctx(node); - if (setup_carry_lp(ctx, graph) < 0) + if (setup_carry_lp(ctx, graph, n_edge) < 0) return isl_schedule_node_free(node); lp = isl_basic_set_copy(graph->lp); diff --git a/polly/lib/External/isl/isl_space.c b/polly/lib/External/isl/isl_space.c index edb23336411..58a64cf4246 100644 --- a/polly/lib/External/isl/isl_space.c +++ b/polly/lib/External/isl/isl_space.c @@ -1779,20 +1779,6 @@ error: return NULL; } -__isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim) -{ - dim = isl_space_cow(dim); - if (!dim) - return NULL; - - dim->n_out += dim->n_in; - dim->n_in = 0; - dim = isl_space_reset(dim, isl_dim_in); - dim = isl_space_reset(dim, isl_dim_out); - - return dim; -} - __isl_give isl_space *isl_space_underlying(__isl_take isl_space *dim, unsigned n_div) { @@ -1891,19 +1877,6 @@ isl_bool isl_space_is_range(__isl_keep isl_space *space1, return isl_space_is_range_internal(space1, space2); } -int isl_space_compatible_internal(__isl_keep isl_space *dim1, - __isl_keep isl_space *dim2) -{ - return dim1->nparam == dim2->nparam && - dim1->n_in + dim1->n_out == dim2->n_in + dim2->n_out; -} - -int isl_space_compatible(__isl_keep isl_space *space1, - __isl_keep isl_space *space2) -{ - return isl_space_compatible_internal(space1, space2); -} - /* Update "hash" by hashing in "space". * Changes in this function should be reflected in isl_hash_space_domain. */ diff --git a/polly/lib/External/isl/isl_space_private.h b/polly/lib/External/isl/isl_space_private.h index f06318d9513..320e7c896d6 100644 --- a/polly/lib/External/isl/isl_space_private.h +++ b/polly/lib/External/isl/isl_space_private.h @@ -34,10 +34,6 @@ isl_bool isl_space_is_domain_internal(__isl_keep isl_space *space1, __isl_keep isl_space *space2); isl_bool isl_space_is_range_internal(__isl_keep isl_space *space1, __isl_keep isl_space *space2); -int isl_space_compatible_internal(__isl_keep isl_space *dim1, - __isl_keep isl_space *dim2); - -__isl_give isl_space *isl_space_as_set_space(__isl_take isl_space *dim); unsigned isl_space_offset(__isl_keep isl_space *dim, enum isl_dim_type type); diff --git a/polly/lib/External/isl/isl_tab_pip.c b/polly/lib/External/isl/isl_tab_pip.c index 23d75c3a4dc..ebab2cb39bd 100644 --- a/polly/lib/External/isl/isl_tab_pip.c +++ b/polly/lib/External/isl/isl_tab_pip.c @@ -5035,14 +5035,6 @@ error: return isl_stat_error; } -isl_stat isl_basic_set_foreach_lexopt(__isl_keep isl_basic_set *bset, int max, - isl_stat (*fn)(__isl_take isl_basic_set *dom, - __isl_take isl_aff_list *list, void *user), - void *user) -{ - return isl_basic_map_foreach_lexopt(bset, max, fn, user); -} - /* Check if the given sequence of len variables starting at pos * represents a trivial (i.e., zero) solution. * The variables are assumed to be non-negative and to come in pairs, |