summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/isl/isl_fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/External/isl/isl_fold.c')
-rw-r--r--polly/lib/External/isl/isl_fold.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/polly/lib/External/isl/isl_fold.c b/polly/lib/External/isl/isl_fold.c
index e05ee101737..f0f92825cc1 100644
--- a/polly/lib/External/isl/isl_fold.c
+++ b/polly/lib/External/isl/isl_fold.c
@@ -652,6 +652,8 @@ __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params(
return isl_qpolynomial_fold_gist(fold, dom_context);
}
+#define isl_qpolynomial_fold_involves_nan isl_qpolynomial_fold_is_nan
+
#define HAS_TYPE
#undef PW
@@ -1424,14 +1426,12 @@ error:
static isl_stat add_pwqp(__isl_take isl_pw_qpolynomial *pwqp, void *user)
{
- isl_ctx *ctx;
isl_pw_qpolynomial_fold *pwf;
isl_union_pw_qpolynomial_fold **upwf;
struct isl_hash_table_entry *entry;
upwf = (isl_union_pw_qpolynomial_fold **)user;
- ctx = pwqp->dim->ctx;
entry = isl_union_pw_qpolynomial_fold_find_part_entry(*upwf,
pwqp->dim, 1);
if (!entry)
@@ -1481,13 +1481,15 @@ error:
return NULL;
}
-static int join_compatible(__isl_keep isl_space *dim1, __isl_keep isl_space *dim2)
+static isl_bool join_compatible(__isl_keep isl_space *space1,
+ __isl_keep isl_space *space2)
{
- int m;
- m = isl_space_match(dim1, isl_dim_param, dim2, isl_dim_param);
+ isl_bool m;
+ m = isl_space_match(space1, isl_dim_param, space2, isl_dim_param);
if (m < 0 || !m)
return m;
- return isl_space_tuple_is_equal(dim1, isl_dim_out, dim2, isl_dim_in);
+ return isl_space_tuple_is_equal(space1, isl_dim_out,
+ space2, isl_dim_in);
}
/* Compute the intersection of the range of the map and the domain
@@ -1508,7 +1510,7 @@ __isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold(
isl_space *map_dim;
isl_space *pwf_dim;
unsigned n_in;
- int ok;
+ isl_bool ok;
ctx = isl_map_get_ctx(map);
if (!ctx)
@@ -1519,6 +1521,8 @@ __isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold(
ok = join_compatible(map_dim, pwf_dim);
isl_space_free(map_dim);
isl_space_free(pwf_dim);
+ if (ok < 0)
+ goto error;
if (!ok)
isl_die(ctx, isl_error_invalid, "incompatible dimensions",
goto error);
@@ -1560,7 +1564,7 @@ static isl_stat pw_qpolynomial_fold_apply(
isl_space *map_dim;
isl_space *pwf_dim;
struct isl_apply_fold_data *data = user;
- int ok;
+ isl_bool ok;
map_dim = isl_map_get_space(data->map);
pwf_dim = isl_pw_qpolynomial_fold_get_space(pwf);
@@ -1568,6 +1572,8 @@ static isl_stat pw_qpolynomial_fold_apply(
isl_space_free(map_dim);
isl_space_free(pwf_dim);
+ if (ok < 0)
+ return isl_stat_error;
if (ok) {
pwf = isl_map_apply_pw_qpolynomial_fold(isl_map_copy(data->map),
pwf, data->tight ? &data->tight : NULL);
OpenPOWER on IntegriCloud