[polly] r287703 - Update to isl-0.17.1-284-gbb38638
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 13:31:59 PST 2016
Author: grosser
Date: Tue Nov 22 15:31:59 2016
New Revision: 287703
URL: http://llvm.org/viewvc/llvm-project?rev=287703&view=rev
Log:
Update to isl-0.17.1-284-gbb38638
Regular maintenance update with only minor changes.
Modified:
polly/trunk/lib/External/isl/GIT_HEAD_ID
polly/trunk/lib/External/isl/doc/manual.pdf
polly/trunk/lib/External/isl/include/isl/map.h
polly/trunk/lib/External/isl/include/isl/set.h
polly/trunk/lib/External/isl/include/isl/space.h
polly/trunk/lib/External/isl/isl_convex_hull.c
polly/trunk/lib/External/isl/isl_map.c
polly/trunk/lib/External/isl/isl_map_private.h
polly/trunk/lib/External/isl/isl_space.c
polly/trunk/lib/External/isl/isl_space_private.h
polly/trunk/lib/External/isl/test_inputs/codegen/isolate5.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=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/GIT_HEAD_ID (original)
+++ polly/trunk/lib/External/isl/GIT_HEAD_ID Tue Nov 22 15:31:59 2016
@@ -1 +1 @@
-isl-0.17.1-267-gbf9723d
+isl-0.17.1-284-gbb38638
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=287703&r1=287702&r2=287703&view=diff
==============================================================================
Binary files polly/trunk/lib/External/isl/doc/manual.pdf (original) and polly/trunk/lib/External/isl/doc/manual.pdf Tue Nov 22 15:31:59 2016 differ
Modified: polly/trunk/lib/External/isl/include/isl/map.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/map.h?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/map.h (original)
+++ polly/trunk/lib/External/isl/include/isl/map.h Tue Nov 22 15:31:59 2016
@@ -188,6 +188,7 @@ __isl_give isl_basic_map *isl_basic_map_
__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
@@ -274,7 +275,9 @@ __isl_give isl_pw_multi_aff *isl_map_lex
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);
@@ -516,6 +519,7 @@ __isl_give isl_basic_map *isl_basic_map_
__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
Modified: polly/trunk/lib/External/isl/include/isl/set.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/set.h?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/set.h (original)
+++ polly/trunk/lib/External/isl/include/isl/set.h Tue Nov 22 15:31:59 2016
@@ -127,6 +127,7 @@ __isl_give isl_basic_set *isl_basic_set_
__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);
@@ -261,6 +262,7 @@ __isl_give isl_basic_set *isl_set_plain_
__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(
@@ -399,7 +401,9 @@ struct isl_set *isl_basic_set_compute_di
__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);
@@ -440,6 +444,7 @@ isl_bool isl_set_plain_is_disjoint(__isl
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);
Modified: polly/trunk/lib/External/isl/include/isl/space.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/space.h?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/space.h (original)
+++ polly/trunk/lib/External/isl/include/isl/space.h Tue Nov 22 15:31:59 2016
@@ -163,6 +163,7 @@ isl_bool isl_space_match(__isl_keep isl_
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);
Modified: polly/trunk/lib/External/isl/isl_convex_hull.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_convex_hull.c?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_convex_hull.c (original)
+++ polly/trunk/lib/External/isl/isl_convex_hull.c Tue Nov 22 15:31:59 2016
@@ -1507,45 +1507,53 @@ static struct isl_basic_set *uset_combin
* lineality space. If any of the intermediate results has
* a non-trivial lineality space, it is projected out.
*/
-static struct isl_basic_set *uset_convex_hull_unbounded(struct isl_set *set)
+static __isl_give isl_basic_set *uset_convex_hull_unbounded(
+ __isl_take isl_set *set)
{
- struct isl_basic_set *convex_hull = NULL;
+ isl_basic_set_list *list;
- convex_hull = isl_set_copy_basic_set(set);
- set = isl_set_drop_basic_set(set, convex_hull);
- if (!set)
- goto error;
- while (set->n > 0) {
+ list = isl_set_get_basic_set_list(set);
+ isl_set_free(set);
+
+ while (list) {
+ int n;
struct isl_basic_set *t;
- t = isl_set_copy_basic_set(set);
- if (!t)
- goto error;
- set = isl_set_drop_basic_set(set, t);
- if (!set)
- goto error;
- convex_hull = convex_hull_pair(convex_hull, t);
- if (set->n == 0)
- break;
- t = isl_basic_set_lineality_space(isl_basic_set_copy(convex_hull));
+ isl_basic_set *bset1, *bset2;
+
+ n = isl_basic_set_list_n_basic_set(list);
+ if (n < 2)
+ isl_die(isl_basic_set_list_get_ctx(list),
+ isl_error_internal,
+ "expecting at least two elements", goto error);
+ bset1 = isl_basic_set_list_get_basic_set(list, n - 1);
+ bset2 = isl_basic_set_list_get_basic_set(list, n - 2);
+ bset1 = convex_hull_pair(bset1, bset2);
+ if (n == 2) {
+ isl_basic_set_list_free(list);
+ return bset1;
+ }
+ bset1 = isl_basic_set_underlying_set(bset1);
+ list = isl_basic_set_list_drop(list, n - 2, 2);
+ list = isl_basic_set_list_add(list, bset1);
+
+ t = isl_basic_set_list_get_basic_set(list, n - 2);
+ t = isl_basic_set_lineality_space(t);
if (!t)
goto error;
if (isl_basic_set_plain_is_universe(t)) {
- isl_basic_set_free(convex_hull);
- convex_hull = t;
- break;
+ isl_basic_set_list_free(list);
+ return t;
}
if (t->n_eq < isl_basic_set_total_dim(t)) {
- convex_hull = isl_basic_set_underlying_set(convex_hull);
- set = isl_set_add_basic_set(set, convex_hull);
+ set = isl_basic_set_list_union(list);
return modulo_lineality(set, t);
}
isl_basic_set_free(t);
}
- isl_set_free(set);
- return convex_hull;
+
+ return NULL;
error:
- isl_set_free(set);
- isl_basic_set_free(convex_hull);
+ isl_basic_set_list_free(list);
return NULL;
}
Modified: polly/trunk/lib/External/isl/isl_map.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_map.c?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_map.c (original)
+++ polly/trunk/lib/External/isl/isl_map.c Tue Nov 22 15:31:59 2016
@@ -2914,7 +2914,7 @@ struct isl_basic_map *isl_basic_map_inte
goto error;
bmap = isl_basic_map_extend_space(bmap, isl_space_copy(bmap->dim),
bset->n_div, bset->n_eq, bset->n_ineq);
- bmap_range = isl_basic_map_from_basic_set(bset, isl_space_copy(bset->dim));
+ bmap_range = bset_to_bmap(bset);
bmap = add_constraints(bmap, bmap_range, 0, 0);
bmap = isl_basic_map_simplify(bmap);
@@ -4553,7 +4553,7 @@ __isl_give isl_map *isl_map_lex_gt_map(_
return map;
}
-__isl_give isl_basic_map *isl_basic_map_from_basic_set(
+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;
@@ -4562,7 +4562,8 @@ __isl_give isl_basic_map *isl_basic_map_
if (!bset || !dim)
goto error;
- isl_assert(bset->ctx, isl_space_compatible(bset->dim, 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;
@@ -4573,6 +4574,12 @@ error:
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
@@ -5310,10 +5317,11 @@ __isl_give isl_map *isl_map_from_set(__i
set = isl_set_cow(set);
if (!set || !dim)
goto error;
- isl_assert(set->ctx, isl_space_compatible(set->dim, 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] = isl_basic_map_from_basic_set(
+ map->p[i] = basic_map_from_basic_set(
set->p[i], isl_space_copy(dim));
if (!map->p[i])
goto error;
@@ -8538,7 +8546,7 @@ struct isl_set *isl_set_remove_empty_par
return set_from_map(isl_map_remove_empty_parts(set_to_map(set)));
}
-struct isl_basic_map *isl_map_copy_basic_map(struct isl_map *map)
+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)
@@ -8548,12 +8556,17 @@ struct isl_basic_map *isl_map_copy_basic
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(isl_map_copy_basic_map(set_to_map(set)));
+ return bset_from_bmap(map_copy_basic_map(set_to_map(set)));
}
-__isl_give isl_map *isl_map_drop_basic_map(__isl_take isl_map *map,
+static __isl_give isl_map *map_drop_basic_map(__isl_take isl_map *map,
__isl_keep isl_basic_map *bmap)
{
int i;
@@ -8580,10 +8593,16 @@ error:
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(isl_map_drop_basic_map(set_to_map(set),
+ return set_from_map(map_drop_basic_map(set_to_map(set),
bset_to_bmap(bset)));
}
@@ -8595,14 +8614,13 @@ static enum isl_lp_result basic_set_maxi
__isl_keep isl_basic_set *bset1, __isl_keep isl_basic_set *bset2,
int pos, isl_int *opt)
{
- isl_space *dims;
- struct isl_basic_map *bmap1 = NULL;
- struct isl_basic_map *bmap2 = NULL;
+ isl_basic_map *bmap1;
+ isl_basic_map *bmap2;
struct isl_ctx *ctx;
struct isl_vec *obj;
unsigned total;
unsigned nparam;
- unsigned dim1, dim2;
+ unsigned dim1;
enum isl_lp_result res;
if (!bset1 || !bset2)
@@ -8610,25 +8628,22 @@ static enum isl_lp_result basic_set_maxi
nparam = isl_basic_set_n_param(bset1);
dim1 = isl_basic_set_n_dim(bset1);
- dim2 = isl_basic_set_n_dim(bset2);
- dims = isl_space_alloc(bset1->ctx, nparam, pos, dim1 - pos);
- bmap1 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset1), dims);
- dims = isl_space_alloc(bset2->ctx, nparam, pos, dim2 - pos);
- bmap2 = isl_basic_map_from_basic_set(isl_basic_set_copy(bset2), dims);
- if (!bmap1 || !bmap2)
- goto error;
- bmap1 = isl_basic_map_cow(bmap1);
- bmap1 = isl_basic_map_extend(bmap1, nparam,
- pos, (dim1 - pos) + (dim2 - pos),
- bmap2->n_div, bmap2->n_eq, bmap2->n_ineq);
- bmap1 = add_constraints(bmap1, bmap2, 0, dim1 - pos);
+
+ bmap1 = isl_basic_map_from_range(isl_basic_set_copy(bset1));
+ bmap2 = isl_basic_map_from_range(isl_basic_set_copy(bset2));
+ bmap1 = isl_basic_map_move_dims(bmap1, isl_dim_in, 0,
+ isl_dim_out, 0, pos);
+ bmap2 = isl_basic_map_move_dims(bmap2, isl_dim_in, 0,
+ isl_dim_out, 0, pos);
+ bmap1 = isl_basic_map_range_product(bmap1, bmap2);
if (!bmap1)
- goto error2;
+ return isl_lp_error;
+
total = isl_basic_map_total_dim(bmap1);
ctx = bmap1->ctx;
obj = isl_vec_alloc(ctx, 1 + total);
if (!obj)
- goto error2;
+ goto error;
isl_seq_clr(obj->block.data, 1 + total);
isl_int_set_si(obj->block.data[1+nparam+pos], 1);
isl_int_set_si(obj->block.data[1+nparam+pos+(dim1-pos)], -1);
@@ -8638,8 +8653,6 @@ static enum isl_lp_result basic_set_maxi
isl_vec_free(obj);
return res;
error:
- isl_basic_map_free(bmap2);
-error2:
isl_basic_map_free(bmap1);
return isl_lp_error;
}
@@ -9447,6 +9460,41 @@ __isl_give isl_basic_set *isl_basic_set_
return isl_basic_map_list_intersect(list);
}
+/* Return the union of the elements of "list".
+ * The list is required to have at least one element.
+ */
+__isl_give isl_set *isl_basic_set_list_union(
+ __isl_take isl_basic_set_list *list)
+{
+ int i, n;
+ isl_space *space;
+ isl_basic_set *bset;
+ isl_set *set;
+
+ if (!list)
+ return NULL;
+ n = isl_basic_set_list_n_basic_set(list);
+ if (n < 1)
+ isl_die(isl_basic_set_list_get_ctx(list), isl_error_invalid,
+ "expecting non-empty list", goto error);
+
+ bset = isl_basic_set_list_get_basic_set(list, 0);
+ space = isl_basic_set_get_space(bset);
+ isl_basic_set_free(bset);
+
+ set = isl_set_alloc_space(space, n, 0);
+ for (i = 0; i < n; ++i) {
+ bset = isl_basic_set_list_get_basic_set(list, i);
+ set = isl_set_add_basic_set(set, bset);
+ }
+
+ isl_basic_set_list_free(list);
+ return set;
+error:
+ isl_basic_set_list_free(list);
+ return NULL;
+}
+
/* Return the union of the elements in the non-empty list "list".
* All elements are assumed to live in the same space.
*/
Modified: polly/trunk/lib/External/isl/isl_map_private.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_map_private.h?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_map_private.h (original)
+++ polly/trunk/lib/External/isl/isl_map_private.h Tue Nov 22 15:31:59 2016
@@ -262,6 +262,9 @@ struct isl_map *isl_map_cow(struct isl_m
uint32_t isl_basic_map_get_hash(__isl_keep isl_basic_map *bmap);
+__isl_give isl_set *isl_basic_set_list_union(
+ __isl_take isl_basic_set_list *list);
+
struct isl_basic_map *isl_basic_map_set_to_empty(struct isl_basic_map *bmap);
struct isl_basic_set *isl_basic_set_set_to_empty(struct isl_basic_set *bset);
struct isl_basic_set *isl_basic_set_order_divs(struct isl_basic_set *bset);
Modified: polly/trunk/lib/External/isl/isl_space.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_space.c?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_space.c (original)
+++ polly/trunk/lib/External/isl/isl_space.c Tue Nov 22 15:31:59 2016
@@ -1891,13 +1891,19 @@ isl_bool isl_space_is_range(__isl_keep i
return isl_space_is_range_internal(space1, space2);
}
-int isl_space_compatible(__isl_keep isl_space *dim1,
+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.
*/
Modified: polly/trunk/lib/External/isl/isl_space_private.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_space_private.h?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_space_private.h (original)
+++ polly/trunk/lib/External/isl/isl_space_private.h Tue Nov 22 15:31:59 2016
@@ -34,6 +34,8 @@ isl_bool isl_space_is_domain_internal(__
__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);
Modified: polly/trunk/lib/External/isl/test_inputs/codegen/isolate5.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/test_inputs/codegen/isolate5.c?rev=287703&r1=287702&r2=287703&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/test_inputs/codegen/isolate5.c (original)
+++ polly/trunk/lib/External/isl/test_inputs/codegen/isolate5.c Tue Nov 22 15:31:59 2016
@@ -1,26 +1,29 @@
{
- for (int c0 = 0; c0 <= 9; c0 += 1)
- for (int c1 = 0; c1 <= 1; c1 += 1) {
- if (c0 % 2 == 0) {
+ for (int c0 = 0; c0 <= 9; c0 += 1) {
+ if (c0 % 2 == 0) {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
A(c0 / 2, c1);
- } else {
+ } else {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
B((c0 - 1) / 2, c1);
- }
}
- for (int c0 = 10; c0 <= 89; c0 += 1)
- for (int c1 = 0; c1 <= 1; c1 += 1) {
- if (c0 % 2 == 0) {
+ }
+ for (int c0 = 10; c0 <= 89; c0 += 1) {
+ if (c0 % 2 == 0) {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
A(c0 / 2, c1);
- } else {
+ } else {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
B((c0 - 1) / 2, c1);
- }
}
- for (int c0 = 90; c0 <= 199; c0 += 1)
- for (int c1 = 0; c1 <= 1; c1 += 1) {
- if (c0 % 2 == 0) {
+ }
+ for (int c0 = 90; c0 <= 199; c0 += 1) {
+ if (c0 % 2 == 0) {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
A(c0 / 2, c1);
- } else {
+ } else {
+ for (int c1 = 0; c1 <= 1; c1 += 1)
B((c0 - 1) / 2, c1);
- }
}
+ }
}
More information about the llvm-commits
mailing list