Update to isl-0.18-387-g3fa6191

This is a normal / regular maintenance update.

llvm-svn: 297999
This commit is contained in:
Tobias Grosser 2017-03-16 21:33:20 +00:00
parent a902600881
commit f4fe34bfb8
4 changed files with 63 additions and 56 deletions

View File

@ -2851,7 +2851,7 @@ static __isl_give isl_map *
createNextIterationMap(__isl_take isl_space *SetSpace, unsigned Dim) {
auto *MapSpace = isl_space_map_from_set(SetSpace);
auto *NextIterationMap = isl_map_universe(isl_space_copy(MapSpace));
for (unsigned u = 0; u < isl_map_n_in(NextIterationMap); u++)
for (unsigned u = 0; u < isl_map_dim(NextIterationMap, isl_dim_in); u++)
if (u != Dim)
NextIterationMap =
isl_map_equate(NextIterationMap, isl_dim_in, u, isl_dim_out, u);

View File

@ -1 +1 @@
isl-0.18-369-g5e613c6
isl-0.18-387-g3fa6191

View File

@ -42,16 +42,23 @@ extern "C" {
* reference to the old structure(s), use the appropriate _copy function.
*/
unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap);
unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap);
unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap);
unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap);
ISL_DEPRECATED
unsigned isl_basic_map_n_in(__isl_keep const isl_basic_map *bmap);
ISL_DEPRECATED
unsigned isl_basic_map_n_out(__isl_keep const isl_basic_map *bmap);
ISL_DEPRECATED
unsigned isl_basic_map_n_param(__isl_keep const isl_basic_map *bmap);
ISL_DEPRECATED
unsigned isl_basic_map_n_div(__isl_keep const isl_basic_map *bmap);
unsigned isl_basic_map_total_dim(const struct isl_basic_map *bmap);
unsigned isl_basic_map_dim(__isl_keep isl_basic_map *bmap,
enum isl_dim_type type);
ISL_DEPRECATED
unsigned isl_map_n_in(const struct isl_map *map);
ISL_DEPRECATED
unsigned isl_map_n_out(const struct isl_map *map);
ISL_DEPRECATED
unsigned isl_map_n_param(const struct isl_map *map);
unsigned isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type);

View File

@ -169,22 +169,22 @@ unsigned isl_set_n_param(__isl_keep isl_set *set)
return isl_set_dim(set, isl_dim_param);
}
unsigned isl_basic_map_n_in(const struct isl_basic_map *bmap)
unsigned isl_basic_map_n_in(__isl_keep const isl_basic_map *bmap)
{
return bmap ? bmap->dim->n_in : 0;
}
unsigned isl_basic_map_n_out(const struct isl_basic_map *bmap)
unsigned isl_basic_map_n_out(__isl_keep const isl_basic_map *bmap)
{
return bmap ? bmap->dim->n_out : 0;
}
unsigned isl_basic_map_n_param(const struct isl_basic_map *bmap)
unsigned isl_basic_map_n_param(__isl_keep const isl_basic_map *bmap)
{
return bmap ? bmap->dim->nparam : 0;
}
unsigned isl_basic_map_n_div(const struct isl_basic_map *bmap)
unsigned isl_basic_map_n_div(__isl_keep const isl_basic_map *bmap)
{
return bmap ? bmap->n_div : 0;
}
@ -1622,12 +1622,12 @@ static void copy_constraint(struct isl_basic_map *dst_map, isl_int *dst,
struct isl_basic_map *src_map, isl_int *src,
unsigned in_off, unsigned out_off, unsigned div_off)
{
unsigned src_nparam = isl_basic_map_n_param(src_map);
unsigned dst_nparam = isl_basic_map_n_param(dst_map);
unsigned src_in = isl_basic_map_n_in(src_map);
unsigned dst_in = isl_basic_map_n_in(dst_map);
unsigned src_out = isl_basic_map_n_out(src_map);
unsigned dst_out = isl_basic_map_n_out(dst_map);
unsigned src_nparam = isl_basic_map_dim(src_map, isl_dim_param);
unsigned dst_nparam = isl_basic_map_dim(dst_map, isl_dim_param);
unsigned src_in = isl_basic_map_dim(src_map, isl_dim_in);
unsigned dst_in = isl_basic_map_dim(dst_map, isl_dim_in);
unsigned src_out = isl_basic_map_dim(src_map, isl_dim_out);
unsigned dst_out = isl_basic_map_dim(dst_map, isl_dim_out);
isl_int_set(dst[0], src[0]);
isl_seq_cpy(dst+1, src+1, isl_min(dst_nparam, src_nparam));
if (dst_nparam > src_nparam)
@ -2827,9 +2827,9 @@ static void dump_term(struct isl_basic_map *bmap,
isl_int c, int pos, FILE *out)
{
const char *name;
unsigned in = isl_basic_map_n_in(bmap);
unsigned dim = in + isl_basic_map_n_out(bmap);
unsigned nparam = isl_basic_map_n_param(bmap);
unsigned in = isl_basic_map_dim(bmap, isl_dim_in);
unsigned dim = in + isl_basic_map_dim(bmap, isl_dim_out);
unsigned nparam = isl_basic_map_dim(bmap, isl_dim_param);
if (!pos)
isl_int_print(out, c, 0);
else {
@ -4094,10 +4094,10 @@ struct isl_basic_map *isl_basic_map_apply_range(
dim_result = isl_space_join(isl_space_copy(bmap1->dim),
isl_space_copy(bmap2->dim));
n_in = isl_basic_map_n_in(bmap1);
n_out = isl_basic_map_n_out(bmap2);
n = isl_basic_map_n_out(bmap1);
nparam = isl_basic_map_n_param(bmap1);
n_in = isl_basic_map_dim(bmap1, isl_dim_in);
n_out = isl_basic_map_dim(bmap2, isl_dim_out);
n = isl_basic_map_dim(bmap1, isl_dim_out);
nparam = isl_basic_map_dim(bmap1, isl_dim_param);
total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + n;
dim_map1 = isl_dim_map_alloc(bmap1->ctx, total);
@ -4180,9 +4180,9 @@ struct isl_basic_map *isl_basic_map_sum(
isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim),
goto error);
nparam = isl_basic_map_n_param(bmap1);
n_in = isl_basic_map_n_in(bmap1);
n_out = isl_basic_map_n_out(bmap1);
nparam = isl_basic_map_dim(bmap1, isl_dim_param);
n_in = isl_basic_map_dim(bmap1, isl_dim_in);
n_out = isl_basic_map_dim(bmap1, isl_dim_out);
total = nparam + n_in + n_out + bmap1->n_div + bmap2->n_div + 2 * n_out;
dim_map1 = isl_dim_map_alloc(bmap1->ctx, total);
@ -4339,9 +4339,9 @@ struct isl_basic_map *isl_basic_map_floordiv(struct isl_basic_map *bmap,
if (!bmap)
return NULL;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
n_out = isl_basic_map_n_out(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
n_out = isl_basic_map_dim(bmap, isl_dim_out);
total = nparam + n_in + n_out + bmap->n_div + n_out;
dim_map = isl_dim_map_alloc(bmap->ctx, total);
@ -4433,8 +4433,8 @@ static struct isl_basic_map *var_equal(struct isl_basic_map *bmap, unsigned pos)
i = isl_basic_map_alloc_equality(bmap);
if (i < 0)
goto error;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
isl_seq_clr(bmap->eq[i], 1 + isl_basic_map_total_dim(bmap));
isl_int_set_si(bmap->eq[i][1+nparam+pos], -1);
isl_int_set_si(bmap->eq[i][1+nparam+n_in+pos], 1);
@ -4455,8 +4455,8 @@ static struct isl_basic_map *var_less(struct isl_basic_map *bmap, unsigned pos)
i = isl_basic_map_alloc_inequality(bmap);
if (i < 0)
goto error;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap));
isl_int_set_si(bmap->ineq[i][0], -1);
isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1);
@ -4479,8 +4479,8 @@ static __isl_give isl_basic_map *var_less_or_equal(
i = isl_basic_map_alloc_inequality(bmap);
if (i < 0)
goto error;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap));
isl_int_set_si(bmap->ineq[i][1+nparam+pos], -1);
isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], 1);
@ -4501,8 +4501,8 @@ static struct isl_basic_map *var_more(struct isl_basic_map *bmap, unsigned pos)
i = isl_basic_map_alloc_inequality(bmap);
if (i < 0)
goto error;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap));
isl_int_set_si(bmap->ineq[i][0], -1);
isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1);
@ -4525,8 +4525,8 @@ static __isl_give isl_basic_map *var_more_or_equal(
i = isl_basic_map_alloc_inequality(bmap);
if (i < 0)
goto error;
nparam = isl_basic_map_n_param(bmap);
n_in = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
n_in = isl_basic_map_dim(bmap, isl_dim_in);
isl_seq_clr(bmap->ineq[i], 1 + isl_basic_map_total_dim(bmap));
isl_int_set_si(bmap->ineq[i][1+nparam+pos], 1);
isl_int_set_si(bmap->ineq[i][1+nparam+n_in+pos], -1);
@ -5255,7 +5255,7 @@ struct isl_basic_set *isl_basic_map_domain(struct isl_basic_map *bmap)
return NULL;
space = isl_space_domain(isl_basic_map_get_space(bmap));
n_out = isl_basic_map_n_out(bmap);
n_out = isl_basic_map_dim(bmap, isl_dim_out);
bmap = isl_basic_map_project_out(bmap, isl_dim_out, 0, n_out);
return isl_basic_map_reset_space(bmap, space);
@ -7541,8 +7541,8 @@ struct isl_basic_set *isl_basic_map_deltas(struct isl_basic_map *bmap)
bmap->dim, isl_dim_out),
goto error);
target_space = isl_space_domain(isl_basic_map_get_space(bmap));
dim = isl_basic_map_n_in(bmap);
nparam = isl_basic_map_n_param(bmap);
dim = isl_basic_map_dim(bmap, isl_dim_in);
nparam = isl_basic_map_dim(bmap, isl_dim_param);
bmap = isl_basic_map_from_range(isl_basic_map_wrap(bmap));
bmap = isl_basic_map_add_dims(bmap, isl_dim_in, dim);
bmap = isl_basic_map_extend_constraints(bmap, dim, 0);
@ -9039,21 +9039,21 @@ int isl_basic_map_plain_cmp(__isl_keep isl_basic_map *bmap1,
{
int i, cmp;
unsigned total;
isl_space *space1, *space2;
if (!bmap1 || !bmap2)
return -1;
if (bmap1 == bmap2)
return 0;
space1 = isl_basic_map_peek_space(bmap1);
space2 = isl_basic_map_peek_space(bmap2);
cmp = isl_space_cmp(space1, space2);
if (cmp)
return cmp;
if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) !=
ISL_F_ISSET(bmap2, ISL_BASIC_MAP_RATIONAL))
return ISL_F_ISSET(bmap1, ISL_BASIC_MAP_RATIONAL) ? -1 : 1;
if (isl_basic_map_n_param(bmap1) != isl_basic_map_n_param(bmap2))
return isl_basic_map_n_param(bmap1) - isl_basic_map_n_param(bmap2);
if (isl_basic_map_n_in(bmap1) != isl_basic_map_n_in(bmap2))
return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2);
if (isl_basic_map_n_out(bmap1) != isl_basic_map_n_out(bmap2))
return isl_basic_map_n_out(bmap1) - isl_basic_map_n_out(bmap2);
if (ISL_F_ISSET(bmap1, ISL_BASIC_MAP_EMPTY) &&
ISL_F_ISSET(bmap2, ISL_BASIC_MAP_EMPTY))
return 0;
@ -9411,11 +9411,11 @@ struct isl_basic_map *isl_basic_map_product(
dim_result = isl_space_product(isl_space_copy(bmap1->dim),
isl_space_copy(bmap2->dim));
in1 = isl_basic_map_n_in(bmap1);
in2 = isl_basic_map_n_in(bmap2);
out1 = isl_basic_map_n_out(bmap1);
out2 = isl_basic_map_n_out(bmap2);
nparam = isl_basic_map_n_param(bmap1);
in1 = isl_basic_map_dim(bmap1, isl_dim_in);
in2 = isl_basic_map_dim(bmap2, isl_dim_in);
out1 = isl_basic_map_dim(bmap1, isl_dim_out);
out2 = isl_basic_map_dim(bmap2, isl_dim_out);
nparam = isl_basic_map_dim(bmap1, isl_dim_param);
total = nparam + in1 + in2 + out1 + out2 + bmap1->n_div + bmap2->n_div;
dim_map1 = isl_dim_map_alloc(bmap1->ctx, total);
@ -9526,9 +9526,9 @@ __isl_give isl_basic_map *isl_basic_map_range_product(
isl_space_copy(bmap2->dim));
in = isl_basic_map_dim(bmap1, isl_dim_in);
out1 = isl_basic_map_n_out(bmap1);
out2 = isl_basic_map_n_out(bmap2);
nparam = isl_basic_map_n_param(bmap1);
out1 = isl_basic_map_dim(bmap1, isl_dim_out);
out2 = isl_basic_map_dim(bmap2, isl_dim_out);
nparam = isl_basic_map_dim(bmap1, isl_dim_param);
total = nparam + in + out1 + out2 + bmap1->n_div + bmap2->n_div;
dim_map1 = isl_dim_map_alloc(bmap1->ctx, total);