[polly] r333621 - Update isl to isl-0.19-173-g77fe2538
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed May 30 20:59:06 PDT 2018
Author: grosser
Date: Wed May 30 20:59:05 2018
New Revision: 333621
URL: http://llvm.org/viewvc/llvm-project?rev=333621&view=rev
Log:
Update isl to isl-0.19-173-g77fe2538
Besides other changes, this update introduces functions to translate a
maps and sets into lists of their elements. These lists are useful as
we can define iterators for lists, which allow us to replace many uses
of foreach.
Added:
polly/trunk/lib/External/isl/set_list_from_map_list_inl.c
Modified:
polly/trunk/lib/External/isl/GIT_HEAD_ID
polly/trunk/lib/External/isl/Makefile.am
polly/trunk/lib/External/isl/Makefile.in
polly/trunk/lib/External/isl/doc/user.pod
polly/trunk/lib/External/isl/include/isl/map.h
polly/trunk/lib/External/isl/include/isl/stride_info.h
polly/trunk/lib/External/isl/include/isl/union_map.h
polly/trunk/lib/External/isl/include/isl/union_set.h
polly/trunk/lib/External/isl/isl_aff.c
polly/trunk/lib/External/isl/isl_ast.c
polly/trunk/lib/External/isl/isl_ast_graft.c
polly/trunk/lib/External/isl/isl_ast_graft_private.h
polly/trunk/lib/External/isl/isl_bound.c
polly/trunk/lib/External/isl/isl_coalesce.c
polly/trunk/lib/External/isl/isl_constraint.c
polly/trunk/lib/External/isl/isl_map.c
polly/trunk/lib/External/isl/isl_map_private.h
polly/trunk/lib/External/isl/isl_multi_templ.c
polly/trunk/lib/External/isl/isl_polynomial.c
polly/trunk/lib/External/isl/isl_pw_templ.c
polly/trunk/lib/External/isl/isl_reordering.c
polly/trunk/lib/External/isl/isl_reordering.h
polly/trunk/lib/External/isl/isl_schedule_band.c
polly/trunk/lib/External/isl/isl_schedule_read.c
polly/trunk/lib/External/isl/isl_scheduler.c
polly/trunk/lib/External/isl/isl_space.c
polly/trunk/lib/External/isl/isl_stride.c
polly/trunk/lib/External/isl/isl_tab.c
polly/trunk/lib/External/isl/isl_test.c
polly/trunk/lib/External/isl/isl_union_map.c
polly/trunk/lib/External/isl/isl_union_templ.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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/GIT_HEAD_ID (original)
+++ polly/trunk/lib/External/isl/GIT_HEAD_ID Wed May 30 20:59:05 2018
@@ -1 +1 @@
-isl-0.19-152-g437e6ab0
+isl-0.19-173-g77fe2538
Modified: polly/trunk/lib/External/isl/Makefile.am
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/Makefile.am?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/Makefile.am (original)
+++ polly/trunk/lib/External/isl/Makefile.am Wed May 30 20:59:05 2018
@@ -379,6 +379,7 @@ EXTRA_DIST = \
read_in_string_templ.c \
set_to_map.c \
set_from_map.c \
+ set_list_from_map_list_inl.c \
isl_tab_lexopt_templ.c \
uset_to_umap.c \
uset_from_umap.c \
Modified: polly/trunk/lib/External/isl/Makefile.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/Makefile.in?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/Makefile.in (original)
+++ polly/trunk/lib/External/isl/Makefile.in Wed May 30 20:59:05 2018
@@ -1179,6 +1179,7 @@ EXTRA_DIST = \
read_in_string_templ.c \
set_to_map.c \
set_from_map.c \
+ set_list_from_map_list_inl.c \
isl_tab_lexopt_templ.c \
uset_to_umap.c \
uset_from_umap.c \
Modified: polly/trunk/lib/External/isl/doc/user.pod
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/doc/user.pod?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/doc/user.pod (original)
+++ polly/trunk/lib/External/isl/doc/user.pod Wed May 30 20:59:05 2018
@@ -607,6 +607,10 @@ in which the object was created.
isl_ctx *isl_ast_node_get_ctx(
__isl_keep isl_ast_node *node);
+ #include <isl/stride_info.h>
+ isl_ctx *isl_stride_info_get_ctx(
+ __isl_keep isl_stride_info *si);
+
=head2 Return Types
C<isl> uses two special return types for functions that either return
@@ -2277,8 +2281,9 @@ from
#include <isl/map.h>
int isl_map_n_basic_map(__isl_keep isl_map *map);
-It is also possible to obtain a list of basic sets from a set
-or union set
+It is also possible to obtain a list of (basic) sets from a set
+or union set, a list of basic maps from a map and a list of maps from a union
+map.
#include <isl/set.h>
__isl_give isl_basic_set_list *isl_set_get_basic_set_list(
@@ -2288,6 +2293,16 @@ or union set
__isl_give isl_basic_set_list *
isl_union_set_get_basic_set_list(
__isl_keep isl_union_set *uset);
+ __isl_give isl_set_list *isl_union_set_get_set_list(
+ __isl_keep isl_union_set *uset);
+
+ #include <isl/map.h>
+ __isl_give isl_basic_map_list *isl_map_get_basic_map_list(
+ __isl_keep isl_map *map);
+
+ #include <isl/union_map.h>
+ __isl_give isl_map_list *isl_union_map_get_map_list(
+ __isl_keep isl_union_map *umap);
The returned list can be manipulated using the functions in L<"Lists">.
@@ -4011,9 +4026,12 @@ using the following functions.
__isl_give isl_aff *isl_stride_info_get_offset(
__isl_keep isl_stride_info *si);
-The stride info object can be released using the following function.
+The stride info object can be copied and released using the following
+functions.
#include <isl/stride_info.h>
+ __isl_give isl_stride_info *isl_stride_info_copy(
+ __isl_keep isl_stride_info *si);
__isl_null isl_stride_info *isl_stride_info_free(
__isl_take isl_stride_info *si);
@@ -9959,18 +9977,22 @@ Exact division. That is, the result is
Result of integer division, rounded towards negative
infinity.
+The divisor is known to be positive.
=item C<isl_ast_op_pdiv_q>
Result of integer division, where dividend is known to be non-negative.
+The divisor is known to be positive.
=item C<isl_ast_op_pdiv_r>
Remainder of integer division, where dividend is known to be non-negative.
+The divisor is known to be positive.
=item C<isl_ast_op_zdiv_r>
Equal to zero iff the remainder on integer division is zero.
+The divisor is known to be positive.
=item C<isl_ast_op_cond>
@@ -10139,7 +10161,10 @@ the context of an C<isl_ast_build>.
The function C<isl_ast_expr_address_of> can be applied to an
C<isl_ast_expr> of type C<isl_ast_op_access> only. It is meant
-to represent the address of the C<isl_ast_expr_access>. The function
+to represent the address of the C<isl_ast_expr_access>.
+The second argument of the functions C<isl_ast_expr_pdiv_q> and
+C<isl_ast_expr_pdiv_r> should always evaluate to a positive number.
+The function
C<isl_ast_expr_and_then> as well as C<isl_ast_expr_or_else> are short-circuit
versions of C<isl_ast_expr_and> and C<isl_ast_expr_or>, respectively.
@@ -10167,7 +10192,7 @@ versions of C<isl_ast_expr_and> and C<is
__isl_keep isl_ast_build *build,
__isl_take isl_multi_pw_aff *mpa);
-The set <set> and
+The set C<set> and
the domains of C<pa>, C<mpa> and C<pma> should correspond
to the schedule space of C<build>.
The tuple id of C<mpa> or C<pma> is used as the array being accessed or
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/map.h (original)
+++ polly/trunk/lib/External/isl/include/isl/map.h Wed May 30 20:59:05 2018
@@ -620,6 +620,8 @@ int isl_map_n_basic_map(__isl_keep isl_m
__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_give isl_basic_map_list *isl_map_get_basic_map_list(
+ __isl_keep isl_map *map);
__isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map,
__isl_take isl_val *exp);
Modified: polly/trunk/lib/External/isl/include/isl/stride_info.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/stride_info.h?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/stride_info.h (original)
+++ polly/trunk/lib/External/isl/include/isl/stride_info.h Wed May 30 20:59:05 2018
@@ -15,10 +15,13 @@ extern "C" {
struct isl_stride_info;
typedef struct isl_stride_info isl_stride_info;
+isl_ctx *isl_stride_info_get_ctx(__isl_keep isl_stride_info *si);
__isl_give isl_val *isl_stride_info_get_stride(__isl_keep isl_stride_info *si);
__isl_give isl_aff *isl_stride_info_get_offset(__isl_keep isl_stride_info *si);
__isl_null isl_stride_info *isl_stride_info_free(
__isl_take isl_stride_info *si);
+__isl_give isl_stride_info *isl_stride_info_copy(
+ __isl_keep isl_stride_info *si);
#if defined(__cplusplus)
}
Modified: polly/trunk/lib/External/isl/include/isl/union_map.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/union_map.h?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/union_map.h (original)
+++ polly/trunk/lib/External/isl/include/isl/union_map.h Wed May 30 20:59:05 2018
@@ -235,6 +235,8 @@ int isl_union_map_n_map(__isl_keep isl_u
__isl_export
isl_stat isl_union_map_foreach_map(__isl_keep isl_union_map *umap,
isl_stat (*fn)(__isl_take isl_map *map, void *user), void *user);
+__isl_give isl_map_list *isl_union_map_get_map_list(
+ __isl_keep isl_union_map *umap);
isl_bool isl_union_map_every_map(__isl_keep isl_union_map *umap,
isl_bool (*test)(__isl_keep isl_map *map, void *user), void *user);
__isl_give isl_union_map *isl_union_map_remove_map_if(
Modified: polly/trunk/lib/External/isl/include/isl/union_set.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/include/isl/union_set.h?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/include/isl/union_set.h (original)
+++ polly/trunk/lib/External/isl/include/isl/union_set.h Wed May 30 20:59:05 2018
@@ -121,6 +121,8 @@ isl_stat isl_union_set_foreach_set(__isl
isl_stat (*fn)(__isl_take isl_set *set, void *user), void *user);
__isl_give isl_basic_set_list *isl_union_set_get_basic_set_list(
__isl_keep isl_union_set *uset);
+__isl_give isl_set_list *isl_union_set_get_set_list(
+ __isl_keep isl_union_set *uset);
isl_bool isl_union_set_contains(__isl_keep isl_union_set *uset,
__isl_keep isl_space *space);
__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset,
Modified: polly/trunk/lib/External/isl/isl_aff.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_aff.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_aff.c (original)
+++ polly/trunk/lib/External/isl/isl_aff.c Wed May 30 20:59:05 2018
@@ -557,10 +557,6 @@ __isl_give isl_aff *isl_aff_align_params
if (!equal_params) {
isl_reordering *exp;
- model = isl_space_drop_dims(model, isl_dim_in,
- 0, isl_space_dim(model, isl_dim_in));
- model = isl_space_drop_dims(model, isl_dim_out,
- 0, isl_space_dim(model, isl_dim_out));
exp = isl_parameter_alignment_reordering(aff->ls->dim, model);
exp = isl_reordering_extend_space(exp,
isl_aff_get_domain_space(aff));
@@ -7618,7 +7614,7 @@ static isl_stat isl_union_pw_aff_check_m
return isl_stat_error;
if (!match)
isl_die(isl_space_get_ctx(space), isl_error_invalid,
- "expecting set space", return -1);
+ "expecting set space", return isl_stat_error);
upa_space = isl_union_pw_aff_get_space(upa);
match = isl_space_has_equal_params(space, upa_space);
Modified: polly/trunk/lib/External/isl/isl_ast.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_ast.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_ast.c (original)
+++ polly/trunk/lib/External/isl/isl_ast.c Wed May 30 20:59:05 2018
@@ -358,7 +358,7 @@ isl_bool isl_ast_expr_is_equal(__isl_kee
if (equal < 0 || !equal)
return equal;
}
- return 1;
+ return isl_bool_true;
case isl_ast_expr_error:
return isl_bool_error;
}
Modified: polly/trunk/lib/External/isl/isl_ast_graft.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_ast_graft.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_ast_graft.c (original)
+++ polly/trunk/lib/External/isl/isl_ast_graft.c Wed May 30 20:59:05 2018
@@ -993,7 +993,7 @@ __isl_give isl_ast_node *isl_ast_node_fr
return isl_ast_node_from_ast_node_list(node_list);
}
-void *isl_ast_graft_free(__isl_take isl_ast_graft *graft)
+__isl_null isl_ast_graft *isl_ast_graft_free(__isl_take isl_ast_graft *graft)
{
if (!graft)
return NULL;
Modified: polly/trunk/lib/External/isl/isl_ast_graft_private.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_ast_graft_private.h?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_ast_graft_private.h (original)
+++ polly/trunk/lib/External/isl/isl_ast_graft_private.h Wed May 30 20:59:05 2018
@@ -53,7 +53,7 @@ __isl_give isl_ast_graft_list *isl_ast_g
__isl_keep isl_ast_build *build);
__isl_give isl_ast_graft *isl_ast_graft_alloc_domain(
__isl_take isl_map *schedule, __isl_keep isl_ast_build *build);
-void *isl_ast_graft_free(__isl_take isl_ast_graft *graft);
+__isl_null isl_ast_graft *isl_ast_graft_free(__isl_take isl_ast_graft *graft);
__isl_give isl_ast_graft_list *isl_ast_graft_list_sort_guard(
__isl_take isl_ast_graft_list *list);
Modified: polly/trunk/lib/External/isl/isl_bound.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_bound.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_bound.c (original)
+++ polly/trunk/lib/External/isl/isl_bound.c Wed May 30 20:59:05 2018
@@ -45,7 +45,7 @@ static isl_stat compressed_guarded_poly_
error:
isl_basic_set_free(bset);
isl_qpolynomial_free(poly);
- return -1;
+ return isl_stat_error;
}
static isl_stat unwrapped_guarded_poly_bound(__isl_take isl_basic_set *bset,
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_coalesce.c (original)
+++ polly/trunk/lib/External/isl/isl_coalesce.c Wed May 30 20:59:05 2018
@@ -2703,9 +2703,9 @@ static isl_bool same_divs(__isl_keep isl
total = isl_basic_map_total_dim(bmap1);
for (i = 0; i < bmap1->n_div; ++i)
if (!isl_seq_eq(bmap1->div[i], bmap2->div[i], 2 + total))
- return 0;
+ return isl_bool_false;
- return 1;
+ return isl_bool_true;
}
/* Assuming that "tab" contains the equality constraints and
Modified: polly/trunk/lib/External/isl/isl_constraint.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_constraint.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_constraint.c (original)
+++ polly/trunk/lib/External/isl/isl_constraint.c Wed May 30 20:59:05 2018
@@ -1248,7 +1248,7 @@ error:
isl_constraint_free(lower);
isl_constraint_free(upper);
isl_basic_set_free(context);
- return -1;
+ return isl_stat_error;
}
__isl_give isl_aff *isl_constraint_get_bound(
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_map.c (original)
+++ polly/trunk/lib/External/isl/isl_map.c Wed May 30 20:59:05 2018
@@ -11753,10 +11753,6 @@ __isl_give isl_map *isl_map_align_params
if (!aligned) {
isl_reordering *exp;
- model = isl_space_drop_dims(model, isl_dim_in,
- 0, isl_space_dim(model, isl_dim_in));
- model = isl_space_drop_dims(model, isl_dim_out,
- 0, isl_space_dim(model, isl_dim_out));
exp = isl_parameter_alignment_reordering(map->dim, model);
exp = isl_reordering_extend_space(exp, isl_map_get_space(map));
map = isl_map_realign(map, exp);
@@ -11801,10 +11797,6 @@ __isl_give isl_basic_map *isl_basic_map_
isl_reordering *exp;
struct isl_dim_map *dim_map;
- model = isl_space_drop_dims(model, isl_dim_in,
- 0, isl_space_dim(model, isl_dim_in));
- model = isl_space_drop_dims(model, isl_dim_out,
- 0, isl_space_dim(model, isl_dim_out));
exp = isl_parameter_alignment_reordering(bmap->dim, model);
exp = isl_reordering_extend_space(exp,
isl_basic_map_get_space(bmap));
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_map_private.h (original)
+++ polly/trunk/lib/External/isl/isl_map_private.h Wed May 30 20:59:05 2018
@@ -534,9 +534,6 @@ __isl_give isl_basic_map *isl_basic_map_
__isl_give isl_basic_map *isl_basic_map_shift_div(
__isl_take isl_basic_map *bmap, int div, int pos, isl_int shift);
-__isl_give isl_basic_map_list *isl_map_get_basic_map_list(
- __isl_keep isl_map *map);
-
int isl_basic_set_count_upto(__isl_keep isl_basic_set *bset,
isl_int max, isl_int *count);
int isl_set_count_upto(__isl_keep isl_set *set, isl_int max, isl_int *count);
Modified: polly/trunk/lib/External/isl/isl_multi_templ.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_multi_templ.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_multi_templ.c (original)
+++ polly/trunk/lib/External/isl/isl_multi_templ.c Wed May 30 20:59:05 2018
@@ -515,7 +515,6 @@ __isl_give MULTI(BASE) *FN(MULTI(BASE),a
if (!multi)
goto error;
}
- model = isl_space_params(model);
exp = isl_parameter_alignment_reordering(multi->space, model);
exp = isl_reordering_extend_space(exp,
FN(MULTI(BASE),get_domain_space)(multi));
Modified: polly/trunk/lib/External/isl/isl_polynomial.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_polynomial.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_polynomial.c (original)
+++ polly/trunk/lib/External/isl/isl_polynomial.c Wed May 30 20:59:05 2018
@@ -4273,10 +4273,6 @@ __isl_give isl_qpolynomial *isl_qpolynom
if (!equal_params) {
isl_reordering *exp;
- model = isl_space_drop_dims(model, isl_dim_in,
- 0, isl_space_dim(model, isl_dim_in));
- model = isl_space_drop_dims(model, isl_dim_out,
- 0, isl_space_dim(model, isl_dim_out));
exp = isl_parameter_alignment_reordering(qp->dim, model);
exp = isl_reordering_extend_space(exp,
isl_qpolynomial_get_domain_space(qp));
@@ -4380,7 +4376,7 @@ static isl_stat set_div(__isl_take isl_s
error:
isl_set_free(set);
isl_qpolynomial_free(qp);
- return -1;
+ return isl_stat_error;
}
/* Split the domain "set" such that integer division "div"
Modified: polly/trunk/lib/External/isl/isl_pw_templ.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_pw_templ.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_pw_templ.c (original)
+++ polly/trunk/lib/External/isl/isl_pw_templ.c Wed May 30 20:59:05 2018
@@ -330,10 +330,6 @@ __isl_give PW *FN(PW,align_params)(__isl
if (!equal_params) {
isl_reordering *exp;
- model = isl_space_drop_dims(model, isl_dim_in,
- 0, isl_space_dim(model, isl_dim_in));
- model = isl_space_drop_dims(model, isl_dim_out,
- 0, isl_space_dim(model, isl_dim_out));
exp = isl_parameter_alignment_reordering(pw->dim, model);
exp = isl_reordering_extend_space(exp,
FN(PW,get_domain_space)(pw));
Modified: polly/trunk/lib/External/isl/isl_reordering.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_reordering.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_reordering.c (original)
+++ polly/trunk/lib/External/isl/isl_reordering.c Wed May 30 20:59:05 2018
@@ -70,7 +70,7 @@ __isl_give isl_reordering *isl_reorderin
return isl_reordering_dup(r);
}
-void *isl_reordering_free(__isl_take isl_reordering *exp)
+__isl_null isl_reordering *isl_reordering_free(__isl_take isl_reordering *exp)
{
if (!exp)
return NULL;
@@ -124,7 +124,7 @@ __isl_give isl_reordering *isl_parameter
if (!exp)
return NULL;
- exp->space = isl_space_copy(aligner);
+ exp->space = isl_space_params(isl_space_copy(aligner));
for (i = 0; i < alignee->nparam; ++i) {
isl_id *id_i;
Modified: polly/trunk/lib/External/isl/isl_reordering.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_reordering.h?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_reordering.h (original)
+++ polly/trunk/lib/External/isl/isl_reordering.h Wed May 30 20:59:05 2018
@@ -25,7 +25,7 @@ __isl_give isl_space *isl_reordering_get
__isl_give isl_reordering *isl_parameter_alignment_reordering(
__isl_keep isl_space *alignee, __isl_keep isl_space *aligner);
__isl_give isl_reordering *isl_reordering_copy(__isl_keep isl_reordering *exp);
-void *isl_reordering_free(__isl_take isl_reordering *exp);
+__isl_null isl_reordering *isl_reordering_free(__isl_take isl_reordering *exp);
__isl_give isl_reordering *isl_reordering_extend_space(
__isl_take isl_reordering *exp, __isl_take isl_space *space);
__isl_give isl_reordering *isl_reordering_extend(__isl_take isl_reordering *exp,
Modified: polly/trunk/lib/External/isl/isl_schedule_band.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_schedule_band.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_schedule_band.c (original)
+++ polly/trunk/lib/External/isl/isl_schedule_band.c Wed May 30 20:59:05 2018
@@ -371,7 +371,7 @@ enum isl_ast_loop_type isl_schedule_band
if (pos < 0 || pos >= band->n)
isl_die(isl_schedule_band_get_ctx(band), isl_error_invalid,
- "invalid member position", return -1);
+ "invalid member position", return isl_ast_loop_error);
if (!band->loop_type)
return isl_ast_loop_default;
@@ -426,7 +426,7 @@ enum isl_ast_loop_type isl_schedule_band
if (pos < 0 || pos >= band->n)
isl_die(isl_schedule_band_get_ctx(band), isl_error_invalid,
- "invalid member position", return -1);
+ "invalid member position", return isl_ast_loop_error);
if (!band->isolate_loop_type)
return isl_ast_loop_default;
Modified: polly/trunk/lib/External/isl/isl_schedule_read.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_schedule_read.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_schedule_read.c (original)
+++ polly/trunk/lib/External/isl/isl_schedule_read.c Wed May 30 20:59:05 2018
@@ -714,7 +714,7 @@ static __isl_give isl_schedule_tree *isl
break;
case isl_schedule_key_child:
isl_die(isl_stream_get_ctx(s), isl_error_unsupported,
- "cannot identity node type", return NULL);
+ "cannot identify node type", return NULL);
case isl_schedule_key_end:
case isl_schedule_key_error:
return NULL;
Modified: polly/trunk/lib/External/isl/isl_scheduler.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_scheduler.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_scheduler.c (original)
+++ polly/trunk/lib/External/isl/isl_scheduler.c Wed May 30 20:59:05 2018
@@ -562,7 +562,7 @@ static isl_bool graph_has_edge(struct is
edge = graph_find_edge(graph, type, src, dst);
if (!edge)
- return 0;
+ return isl_bool_false;
empty = isl_map_plain_is_empty(edge->map);
if (empty < 0)
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_space.c (original)
+++ polly/trunk/lib/External/isl/isl_space.c Wed May 30 20:59:05 2018
@@ -2562,7 +2562,6 @@ __isl_give isl_space *isl_space_align_pa
isl_space_check_named_params(space2) < 0)
goto error;
- space2 = isl_space_params(space2);
exp = isl_parameter_alignment_reordering(space1, space2);
exp = isl_reordering_extend_space(exp, space1);
isl_space_free(space2);
Modified: polly/trunk/lib/External/isl/isl_stride.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_stride.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_stride.c (original)
+++ polly/trunk/lib/External/isl/isl_stride.c Wed May 30 20:59:05 2018
@@ -22,6 +22,16 @@ struct isl_stride_info {
isl_aff *offset;
};
+/* Return the ctx to which "si" belongs.
+ */
+isl_ctx *isl_stride_info_get_ctx(__isl_keep isl_stride_info *si)
+{
+ if (!si)
+ return NULL;
+
+ return isl_val_get_ctx(si->stride);
+}
+
/* Free "si" and return NULL.
*/
__isl_null isl_stride_info *isl_stride_info_free(
@@ -56,6 +66,18 @@ error:
return NULL;
}
+/* Make a copy of "si" and return it.
+ */
+__isl_give isl_stride_info *isl_stride_info_copy(
+ __isl_keep isl_stride_info *si)
+{
+ if (!si)
+ return NULL;
+
+ return isl_stride_info_alloc(isl_val_copy(si->stride),
+ isl_aff_copy(si->offset));
+}
+
/* Return the stride of "si".
*/
__isl_give isl_val *isl_stride_info_get_stride(__isl_keep isl_stride_info *si)
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=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_tab.c (original)
+++ polly/trunk/lib/External/isl/isl_tab.c Wed May 30 20:59:05 2018
@@ -2281,10 +2281,10 @@ static isl_stat add_div_constraints(stru
isl_vec_free(ineq);
- return 0;
+ return isl_stat_ok;
error:
isl_vec_free(ineq);
- return -1;
+ return isl_stat_error;
}
/* Check whether the div described by "div" is obviously non-negative.
@@ -3681,7 +3681,8 @@ static isl_stat perform_undo_var(struct
case isl_tab_undo_redundant:
if (!var->is_row || var->index != tab->n_redundant - 1)
isl_die(isl_tab_get_ctx(tab), isl_error_internal,
- "not undoing last redundant row", return -1);
+ "not undoing last redundant row",
+ return isl_stat_error);
return restore_last_redundant(tab);
case isl_tab_undo_freeze:
var->frozen = 0;
Modified: polly/trunk/lib/External/isl/isl_test.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_test.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_test.c (original)
+++ polly/trunk/lib/External/isl/isl_test.c Wed May 30 20:59:05 2018
@@ -3384,6 +3384,208 @@ static int test_bound(isl_ctx *ctx)
return 0;
}
+/* Check that the conversion from 'set' to 'basic set list' works as expected.
+ */
+static isl_stat test_get_list_bset_from_set(isl_ctx *ctx)
+{
+ int i;
+ isl_bool equal;
+ isl_set *set, *set2;
+ isl_basic_set_list *bset_list;
+
+ set = isl_set_read_from_str(ctx, "{ [0]; [2]; [3] }");
+ bset_list = isl_set_get_basic_set_list(set);
+
+ set2 = isl_set_empty(isl_set_get_space(set));
+
+ for (i = 0; i < isl_basic_set_list_n_basic_set(bset_list); i++) {
+ isl_basic_set *bset;
+ bset = isl_basic_set_list_get_basic_set(bset_list, i);
+ set2 = isl_set_union(set2, isl_set_from_basic_set(bset));
+ }
+
+ equal = isl_set_is_equal(set, set2);
+
+ isl_set_free(set);
+ isl_set_free(set2);
+ isl_basic_set_list_free(bset_list);
+
+ if (equal < 0)
+ return isl_stat_error;
+
+ if (!equal)
+ isl_die(ctx, isl_error_unknown, "sets are not equal",
+ return isl_stat_error);
+
+ return isl_stat_ok;
+}
+
+/* Check that the conversion from 'union set' to 'basic set list' works as
+ * expected.
+ */
+static isl_stat test_get_list_bset_from_uset(isl_ctx *ctx)
+{
+ int i;
+ isl_bool equal;
+ isl_union_set *uset, *uset2;
+ isl_basic_set_list *bset_list;
+
+ uset = isl_union_set_read_from_str(ctx, "{ A[0]; B[2]; B[3] }");
+ bset_list = isl_union_set_get_basic_set_list(uset);
+
+ uset2 = isl_union_set_empty(isl_union_set_get_space(uset));
+
+ for (i = 0; i < isl_basic_set_list_n_basic_set(bset_list); i++) {
+ isl_basic_set *bset;
+ bset = isl_basic_set_list_get_basic_set(bset_list, i);
+ uset2 = isl_union_set_union(uset2,
+ isl_union_set_from_basic_set(bset));
+ }
+
+ equal = isl_union_set_is_equal(uset, uset2);
+
+ isl_union_set_free(uset);
+ isl_union_set_free(uset2);
+ isl_basic_set_list_free(bset_list);
+
+ if (equal < 0)
+ return isl_stat_error;
+
+ if (!equal)
+ isl_die(ctx, isl_error_unknown, "sets are not equal",
+ return isl_stat_error);
+
+ return isl_stat_ok;
+}
+
+/* Check that the conversion from 'union set' to 'set list' works as expected.
+ */
+static isl_stat test_get_list_set_from_uset(isl_ctx *ctx)
+{
+ int i;
+ isl_bool equal;
+ isl_union_set *uset, *uset2;
+ isl_set_list *set_list;
+
+ uset = isl_union_set_read_from_str(ctx, "{ A[0]; A[2]; B[3] }");
+ set_list = isl_union_set_get_set_list(uset);
+
+ uset2 = isl_union_set_empty(isl_union_set_get_space(uset));
+
+ for (i = 0; i < isl_set_list_n_set(set_list); i++) {
+ isl_set *set;
+ set = isl_set_list_get_set(set_list, i);
+ uset2 = isl_union_set_union(uset2, isl_union_set_from_set(set));
+ }
+
+ equal = isl_union_set_is_equal(uset, uset2);
+
+ isl_union_set_free(uset);
+ isl_union_set_free(uset2);
+ isl_set_list_free(set_list);
+
+ if (equal < 0)
+ return isl_stat_error;
+
+ if (!equal)
+ isl_die(ctx, isl_error_unknown, "union sets are not equal",
+ return isl_stat_error);
+
+ return isl_stat_ok;
+}
+
+/* Check that the conversion from 'map' to 'basic map list' works as expected.
+ */
+static isl_stat test_get_list_bmap_from_map(isl_ctx *ctx)
+{
+ int i;
+ isl_bool equal;
+ isl_map *map, *map2;
+ isl_basic_map_list *bmap_list;
+
+ map = isl_map_read_from_str(ctx,
+ "{ [0] -> [0]; [2] -> [0]; [3] -> [0] }");
+ bmap_list = isl_map_get_basic_map_list(map);
+
+ map2 = isl_map_empty(isl_map_get_space(map));
+
+ for (i = 0; i < isl_basic_map_list_n_basic_map(bmap_list); i++) {
+ isl_basic_map *bmap;
+ bmap = isl_basic_map_list_get_basic_map(bmap_list, i);
+ map2 = isl_map_union(map2, isl_map_from_basic_map(bmap));
+ }
+
+ equal = isl_map_is_equal(map, map2);
+
+ isl_map_free(map);
+ isl_map_free(map2);
+ isl_basic_map_list_free(bmap_list);
+
+ if (equal < 0)
+ return isl_stat_error;
+
+ if (!equal)
+ isl_die(ctx, isl_error_unknown, "maps are not equal",
+ return isl_stat_error);
+
+ return isl_stat_ok;
+}
+
+/* Check that the conversion from 'union map' to 'map list' works as expected.
+ */
+static isl_stat test_get_list_map_from_umap(isl_ctx *ctx)
+{
+ int i;
+ isl_bool equal;
+ isl_union_map *umap, *umap2;
+ isl_map_list *map_list;
+
+ umap = isl_union_map_read_from_str(ctx,
+ "{ A[0] -> [0]; A[2] -> [0]; B[3] -> [0] }");
+ map_list = isl_union_map_get_map_list(umap);
+
+ umap2 = isl_union_map_empty(isl_union_map_get_space(umap));
+
+ for (i = 0; i < isl_map_list_n_map(map_list); i++) {
+ isl_map *map;
+ map = isl_map_list_get_map(map_list, i);
+ umap2 = isl_union_map_union(umap2, isl_union_map_from_map(map));
+ }
+
+ equal = isl_union_map_is_equal(umap, umap2);
+
+ isl_union_map_free(umap);
+ isl_union_map_free(umap2);
+ isl_map_list_free(map_list);
+
+ if (equal < 0)
+ return isl_stat_error;
+
+ if (!equal)
+ isl_die(ctx, isl_error_unknown, "union maps are not equal",
+ return isl_stat_error);
+
+ return isl_stat_ok;
+}
+
+/* Check that the conversion from isl objects to lists works as expected.
+ */
+static int test_get_list(isl_ctx *ctx)
+{
+ if (test_get_list_bset_from_set(ctx))
+ return -1;
+ if (test_get_list_bset_from_uset(ctx))
+ return -1;
+ if (test_get_list_set_from_uset(ctx))
+ return -1;
+ if (test_get_list_bmap_from_map(ctx))
+ return -1;
+ if (test_get_list_map_from_umap(ctx))
+ return -1;
+
+ return 0;
+}
+
static int test_lift(isl_ctx *ctx)
{
const char *str;
@@ -9109,6 +9311,7 @@ struct {
{ "piecewise quasi-polynomials", &test_pwqp },
{ "lift", &test_lift },
{ "bound", &test_bound },
+ { "get lists", &test_get_list },
{ "union", &test_union },
{ "split periods", &test_split_periods },
{ "lexicographic order", &test_lex },
Modified: polly/trunk/lib/External/isl/isl_union_map.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_union_map.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_union_map.c (original)
+++ polly/trunk/lib/External/isl/isl_union_map.c Wed May 30 20:59:05 2018
@@ -29,6 +29,7 @@
#include <set_from_map.c>
#include <uset_to_umap.c>
#include <uset_from_umap.c>
+#include <set_list_from_map_list_inl.c>
/* Return the number of parameters of "umap", where "type"
* is required to be set to isl_dim_param.
@@ -254,7 +255,6 @@ __isl_give isl_union_map *isl_union_map_
return umap;
}
- model = isl_space_params(model);
data.exp = isl_parameter_alignment_reordering(umap->dim, model);
if (!data.exp)
goto error;
@@ -552,6 +552,52 @@ isl_bool isl_union_map_every_map(__isl_k
return isl_bool_error;
}
+/* Add "map" to "list".
+ */
+static isl_stat add_list_map(__isl_take isl_map *map, void *user)
+{
+ isl_map_list **list = user;
+
+ *list = isl_map_list_add(*list, map);
+
+ if (!*list)
+ return isl_stat_error;
+ return isl_stat_ok;
+}
+
+/* Return the maps in "umap" as a list.
+ *
+ * First construct a list of the appropriate size and then add all the
+ * elements.
+ */
+__isl_give isl_map_list *isl_union_map_get_map_list(
+ __isl_keep isl_union_map *umap)
+{
+ int n_maps;
+ isl_ctx *ctx;
+ isl_map_list *list;
+
+ if (!umap)
+ return NULL;
+ ctx = isl_union_map_get_ctx(umap);
+ n_maps = isl_union_map_n_map(umap);
+ list = isl_map_list_alloc(ctx, n_maps);
+
+ if (isl_union_map_foreach_map(umap, &add_list_map, &list) < 0)
+ list = isl_map_list_free(list);
+
+ return list;
+}
+
+/* Return the sets in "uset" as a list.
+ */
+__isl_give isl_set_list *isl_union_set_get_set_list(
+ __isl_keep isl_union_set *uset)
+{
+ return set_list_from_map_list(
+ isl_union_map_get_map_list(uset_to_umap(uset)));
+}
+
static isl_stat copy_map(void **entry, void *user)
{
isl_map *map = *entry;
Modified: polly/trunk/lib/External/isl/isl_union_templ.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/isl_union_templ.c?rev=333621&r1=333620&r2=333621&view=diff
==============================================================================
--- polly/trunk/lib/External/isl/isl_union_templ.c (original)
+++ polly/trunk/lib/External/isl/isl_union_templ.c Wed May 30 20:59:05 2018
@@ -427,7 +427,6 @@ __isl_give UNION *FN(UNION,align_params)
return u;
}
- model = isl_space_params(model);
r = isl_parameter_alignment_reordering(u->space, model);
isl_space_free(model);
Added: polly/trunk/lib/External/isl/set_list_from_map_list_inl.c
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/External/isl/set_list_from_map_list_inl.c?rev=333621&view=auto
==============================================================================
--- polly/trunk/lib/External/isl/set_list_from_map_list_inl.c (added)
+++ polly/trunk/lib/External/isl/set_list_from_map_list_inl.c Wed May 30 20:59:05 2018
@@ -0,0 +1,9 @@
+#include <isl/map_type.h>
+
+/* Return the set list that was treated as the map list "list".
+ */
+static __isl_give isl_set_list *set_list_from_map_list(
+ __isl_take isl_map_list *list)
+{
+ return (isl_set_list *) list;
+}
More information about the llvm-commits
mailing list