Revert "Update isl to isl-0.24-69-g54aac5ac"

This reverts commit 13f95cc3d1.

The commit makes some polly tests failing
This commit is contained in:
Riccardo Mori 2021-07-23 19:06:52 +02:00
parent 7290ddd6b1
commit 2ae7d6d427
20 changed files with 29 additions and 335 deletions

View File

@ -1 +1 @@
isl-0.24-69-g54aac5ac
isl-0.24-52-gd7be01f7

View File

@ -498,7 +498,6 @@ EXTRA_DIST = \
bset_to_bmap.c \
bset_from_bmap.c \
isl_check_named_params_templ.c \
check_parse_fail_test_templ.c \
check_reparse_templ.c \
check_reparse_test_templ.c \
check_single_reference_templ.c \

View File

@ -1398,7 +1398,6 @@ EXTRA_DIST = \
bset_to_bmap.c \
bset_from_bmap.c \
isl_check_named_params_templ.c \
check_parse_fail_test_templ.c \
check_reparse_templ.c \
check_reparse_test_templ.c \
check_single_reference_templ.c \

View File

@ -1,46 +0,0 @@
/*
* Copyright 2021 Cerebras Systems
*
* Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege,
* Cerebras Systems, 1237 E Arques Ave, Sunnyvale, CA, USA
*/
#define xCAT(A,B) A ## B
#define CAT(A,B) xCAT(A,B)
#undef TYPE
#define TYPE CAT(isl_,BASE)
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
#define FN(TYPE,NAME) xFN(TYPE,NAME)
#undef TESTS
#define TESTS CAT(parse_,CAT(BASE,_fail_tests))
/* Test parsing of objects of type TYPE
* that are expected to fail.
*/
static isl_stat FN(check,TESTS)(isl_ctx *ctx)
{
int i, n;
int on_error;
on_error = isl_options_get_on_error(ctx);
isl_options_set_on_error(ctx, ISL_ON_ERROR_CONTINUE);
n = ARRAY_SIZE(TESTS);
for (i = 0; i < n; ++i) {
TYPE *obj;
obj = FN(TYPE,read_from_str)(ctx, TESTS[i]);
FN(TYPE,free)(obj);
if (obj)
break;
}
isl_options_set_on_error(ctx, on_error);
if (i < n)
isl_die(ctx, isl_error_unknown,
"parsing not expected to succeed",
return isl_stat_error);
return isl_stat_ok;
}

View File

@ -5,7 +5,6 @@
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
#define FN(TYPE,NAME) xFN(TYPE,NAME)
#undef TESTS
#define TESTS CAT(reparse_,CAT(BASE,_tests))
/* Test parsing of objects of type TYPE by printing

View File

@ -212,7 +212,6 @@ void isl_aff_dump(__isl_keep isl_aff *aff);
isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
uint32_t isl_pw_aff_get_hash(__isl_keep isl_pw_aff *pa);
__isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff);
__isl_export
__isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff);
__isl_constructor

View File

@ -1490,7 +1490,6 @@ public:
inline isl::checked::map_list map_list() const;
inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
inline class size n_basic_map() const;
inline isl::checked::basic_map polyhedral_hull() const;
inline isl::checked::map preimage_domain(const isl::checked::multi_aff &ma) const;
inline isl::checked::map preimage_domain(const isl::checked::multi_pw_aff &mpa) const;
@ -1624,7 +1623,6 @@ public:
inline isl::checked::val max_val(const isl::checked::aff &obj) const;
inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
inline isl::checked::val min_val(const isl::checked::aff &obj) const;
inline class size n_basic_set() const;
inline isl::checked::basic_set params() const;
inline isl::checked::multi_val plain_multi_val_if_fixed() const;
inline isl::checked::basic_set polyhedral_hull() const;
@ -1910,7 +1908,6 @@ public:
inline isl::checked::map_list map_list() const;
inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
inline class size n_basic_map() const;
inline isl::checked::basic_map polyhedral_hull() const;
inline isl::checked::map preimage_domain(isl::checked::multi_aff ma) const;
inline isl::checked::map preimage_domain(isl::checked::multi_pw_aff mpa) const;
@ -2545,7 +2542,6 @@ public:
inline isl::checked::val min_val(const isl::checked::aff &obj) const;
inline isl::checked::multi_val multi_val() const;
inline isl::checked::multi_val get_multi_val() const;
inline class size n_basic_set() const;
inline isl::checked::basic_set params() const;
inline isl::checked::multi_val plain_multi_val_if_fixed() const;
inline isl::checked::basic_set polyhedral_hull() const;
@ -2723,7 +2719,6 @@ public:
inline isl::checked::pw_multi_aff set_range_tuple(const std::string &id) const;
inline class size size() const;
inline isl::checked::space space() const;
inline isl::checked::space get_space() const;
inline isl::checked::multi_pw_aff sub(const isl::checked::multi_pw_aff &multi2) const;
inline isl::checked::multi_union_pw_aff sub(const isl::checked::multi_union_pw_aff &multi2) const;
inline isl::checked::pw_aff sub(isl::checked::pw_aff pwaff2) const;
@ -3493,7 +3488,6 @@ public:
inline isl::checked::val max_val(const isl::checked::aff &obj) const;
inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
inline isl::checked::val min_val(const isl::checked::aff &obj) const;
inline class size n_basic_set() const;
inline isl::checked::set params() const;
inline isl::checked::multi_val plain_multi_val_if_fixed() const;
inline isl::checked::multi_val get_plain_multi_val_if_fixed() const;
@ -4999,7 +4993,7 @@ class size aff::size() const
isl::checked::space aff::space() const
{
return isl::checked::pw_aff(*this).space();
return isl::checked::multi_aff(*this).space();
}
isl::checked::aff aff::sub(isl::checked::aff aff2) const
@ -7683,11 +7677,6 @@ isl::checked::multi_pw_aff basic_map::min_multi_pw_aff() const
return isl::checked::map(*this).min_multi_pw_aff();
}
class size basic_map::n_basic_map() const
{
return isl::checked::map(*this).n_basic_map();
}
isl::checked::basic_map basic_map::polyhedral_hull() const
{
return isl::checked::map(*this).polyhedral_hull();
@ -8302,11 +8291,6 @@ isl::checked::val basic_set::min_val(const isl::checked::aff &obj) const
return isl::checked::set(*this).min_val(obj);
}
class size basic_set::n_basic_set() const
{
return isl::checked::set(*this).n_basic_set();
}
isl::checked::basic_set basic_set::params() const
{
auto res = isl_basic_set_params(copy());
@ -9550,12 +9534,6 @@ isl::checked::multi_pw_aff map::min_multi_pw_aff() const
return manage(res);
}
class size map::n_basic_map() const
{
auto res = isl_map_n_basic_map(get());
return manage(res);
}
isl::checked::basic_map map::polyhedral_hull() const
{
auto res = isl_map_polyhedral_hull(copy());
@ -12461,11 +12439,6 @@ isl::checked::multi_val point::get_multi_val() const
return multi_val();
}
class size point::n_basic_set() const
{
return isl::checked::basic_set(*this).n_basic_set();
}
isl::checked::basic_set point::params() const
{
return isl::checked::basic_set(*this).params();
@ -13317,13 +13290,7 @@ class size pw_aff::size() const
isl::checked::space pw_aff::space() const
{
auto res = isl_pw_aff_get_space(get());
return manage(res);
}
isl::checked::space pw_aff::get_space() const
{
return space();
return isl::checked::union_pw_aff(*this).space();
}
isl::checked::multi_pw_aff pw_aff::sub(const isl::checked::multi_pw_aff &multi2) const
@ -16250,12 +16217,6 @@ isl::checked::val set::min_val(const isl::checked::aff &obj) const
return manage(res);
}
class size set::n_basic_set() const
{
auto res = isl_set_n_basic_set(get());
return manage(res);
}
isl::checked::set set::params() const
{
auto res = isl_set_params(copy());

View File

@ -1555,7 +1555,6 @@ public:
inline isl::map_list map_list() const;
inline isl::multi_pw_aff max_multi_pw_aff() const;
inline isl::multi_pw_aff min_multi_pw_aff() const;
inline unsigned n_basic_map() const;
inline isl::basic_map polyhedral_hull() const;
inline isl::map preimage_domain(const isl::multi_aff &ma) const;
inline isl::map preimage_domain(const isl::multi_pw_aff &mpa) const;
@ -1689,7 +1688,6 @@ public:
inline isl::val max_val(const isl::aff &obj) const;
inline isl::multi_pw_aff min_multi_pw_aff() const;
inline isl::val min_val(const isl::aff &obj) const;
inline unsigned n_basic_set() const;
inline isl::basic_set params() const;
inline isl::multi_val plain_multi_val_if_fixed() const;
inline isl::basic_set polyhedral_hull() const;
@ -1975,7 +1973,6 @@ public:
inline isl::map_list map_list() const;
inline isl::multi_pw_aff max_multi_pw_aff() const;
inline isl::multi_pw_aff min_multi_pw_aff() const;
inline unsigned n_basic_map() const;
inline isl::basic_map polyhedral_hull() const;
inline isl::map preimage_domain(isl::multi_aff ma) const;
inline isl::map preimage_domain(isl::multi_pw_aff mpa) const;
@ -2610,7 +2607,6 @@ public:
inline isl::val min_val(const isl::aff &obj) const;
inline isl::multi_val multi_val() const;
inline isl::multi_val get_multi_val() const;
inline unsigned n_basic_set() const;
inline isl::basic_set params() const;
inline isl::multi_val plain_multi_val_if_fixed() const;
inline isl::basic_set polyhedral_hull() const;
@ -2788,7 +2784,6 @@ public:
inline isl::pw_multi_aff set_range_tuple(const std::string &id) const;
inline unsigned size() const;
inline isl::space space() const;
inline isl::space get_space() const;
inline isl::multi_pw_aff sub(const isl::multi_pw_aff &multi2) const;
inline isl::multi_union_pw_aff sub(const isl::multi_union_pw_aff &multi2) const;
inline isl::pw_aff sub(isl::pw_aff pwaff2) const;
@ -3558,7 +3553,6 @@ public:
inline isl::val max_val(const isl::aff &obj) const;
inline isl::multi_pw_aff min_multi_pw_aff() const;
inline isl::val min_val(const isl::aff &obj) const;
inline unsigned n_basic_set() const;
inline isl::set params() const;
inline isl::multi_val plain_multi_val_if_fixed() const;
inline isl::multi_val get_plain_multi_val_if_fixed() const;
@ -5422,7 +5416,7 @@ isl::space aff::space() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
return isl::pw_aff(*this).space();
return isl::multi_aff(*this).space();
}
isl::aff aff::sub(isl::aff aff2) const
@ -8986,13 +8980,6 @@ isl::multi_pw_aff basic_map::min_multi_pw_aff() const
return isl::map(*this).min_multi_pw_aff();
}
unsigned basic_map::n_basic_map() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
return isl::map(*this).n_basic_map();
}
isl::basic_map basic_map::polyhedral_hull() const
{
if (!ptr)
@ -9909,13 +9896,6 @@ isl::val basic_set::min_val(const isl::aff &obj) const
return isl::set(*this).min_val(obj);
}
unsigned basic_set::n_basic_set() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
return isl::set(*this).n_basic_set();
}
isl::basic_set basic_set::params() const
{
if (!ptr)
@ -11895,18 +11875,6 @@ isl::multi_pw_aff map::min_multi_pw_aff() const
return manage(res);
}
unsigned map::n_basic_map() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
auto saved_ctx = ctx();
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
auto res = isl_map_n_basic_map(get());
if (res < 0)
exception::throw_last_error(saved_ctx);
return res;
}
isl::basic_map map::polyhedral_hull() const
{
if (!ptr)
@ -16624,13 +16592,6 @@ isl::multi_val point::get_multi_val() const
return multi_val();
}
unsigned point::n_basic_set() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
return isl::basic_set(*this).n_basic_set();
}
isl::basic_set point::params() const
{
if (!ptr)
@ -17952,17 +17913,7 @@ isl::space pw_aff::space() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
auto saved_ctx = ctx();
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
auto res = isl_pw_aff_get_space(get());
if (!res)
exception::throw_last_error(saved_ctx);
return manage(res);
}
isl::space pw_aff::get_space() const
{
return space();
return isl::union_pw_aff(*this).space();
}
isl::multi_pw_aff pw_aff::sub(const isl::multi_pw_aff &multi2) const
@ -22551,18 +22502,6 @@ isl::val set::min_val(const isl::aff &obj) const
return manage(res);
}
unsigned set::n_basic_set() const
{
if (!ptr)
exception::throw_invalid("NULL input", __FILE__, __LINE__);
auto saved_ctx = ctx();
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
auto res = isl_set_n_basic_set(get());
if (res < 0)
exception::throw_last_error(saved_ctx);
return res;
}
isl::set set::params() const
{
if (!ptr)

View File

@ -698,7 +698,6 @@ isl_bool isl_map_plain_is_equal(__isl_keep isl_map *map1,
uint32_t isl_map_get_hash(__isl_keep isl_map *map);
__isl_export
isl_size isl_map_n_basic_map(__isl_keep isl_map *map);
__isl_export
isl_stat isl_map_foreach_basic_map(__isl_keep isl_map *map,

View File

@ -512,7 +512,6 @@ isl_bool isl_set_plain_is_disjoint(__isl_keep isl_set *set1,
uint32_t isl_set_get_hash(__isl_keep isl_set *set);
__isl_export
isl_size isl_set_n_basic_set(__isl_keep isl_set *set);
__isl_export
isl_stat isl_set_foreach_basic_set(__isl_keep isl_set *set,

View File

@ -7235,7 +7235,6 @@ struct pw_aff<Anonymous> : public isl::pw_aff {
template <typename Domain2>
inline typed::pw_multi_aff<Domain2> set_range_tuple(const std::string &id) const;
inline typed::space<Anonymous> space() const;
inline typed::space<Anonymous> get_space() const = delete;
inline typed::multi_pw_aff<Anonymous> sub(const typed::multi_pw_aff<Anonymous> &multi2) const;
inline typed::multi_union_pw_aff<Anonymous> sub(const typed::multi_union_pw_aff<Anonymous> &multi2) const;
inline typed::pw_aff<Anonymous> sub(const typed::pw_aff<Anonymous> &pwaff2) const;
@ -7449,7 +7448,6 @@ struct pw_aff<Domain, Anonymous> : public isl::pw_aff {
template <typename Range2>
inline typed::pw_multi_aff<Domain, Range2> set_range_tuple(const std::string &id) const;
inline typed::space<Domain, Anonymous> space() const;
inline typed::space<Domain, Anonymous> get_space() const = delete;
inline typed::multi_pw_aff<Domain, Anonymous> sub(const typed::multi_pw_aff<Domain, Anonymous> &multi2) const;
inline typed::multi_union_pw_aff<Domain, Anonymous> sub(const typed::multi_union_pw_aff<Domain, Anonymous> &multi2) const;
inline typed::pw_aff<Domain, Anonymous> sub(const typed::pw_aff<Domain, Anonymous> &pwaff2) const;
@ -7665,7 +7663,6 @@ struct pw_aff<pair<Domain2, Range2>, Anonymous> : public isl::pw_aff {
template <typename Arg1>
inline typed::pw_multi_aff<pair<Domain2, Range2>, Arg1> set_range_tuple(const std::string &id) const;
inline typed::space<pair<Domain2, Range2>, Anonymous> space() const;
inline typed::space<pair<Domain2, Range2>, Anonymous> get_space() const = delete;
inline typed::multi_pw_aff<pair<Domain2, Range2>, Anonymous> sub(const typed::multi_pw_aff<pair<Domain2, Range2>, Anonymous> &multi2) const;
inline typed::multi_union_pw_aff<pair<Domain2, Range2>, Anonymous> sub(const typed::multi_union_pw_aff<pair<Domain2, Range2>, Anonymous> &multi2) const;
inline typed::pw_aff<pair<Domain2, Range2>, Anonymous> sub(const typed::pw_aff<pair<Domain2, Range2>, Anonymous> &pwaff2) const;

View File

@ -3163,18 +3163,6 @@ class pw_aff(union_pw_aff, pw_multi_aff, multi_pw_aff):
obj = pw_aff(ctx=ctx, ptr=res)
return obj
raise Error
def space(arg0):
try:
if not arg0.__class__ is pw_aff:
arg0 = pw_aff(arg0)
except:
raise
ctx = arg0.ctx
res = isl.isl_pw_aff_get_space(arg0.ptr)
obj = space(ctx=ctx, ptr=res)
return obj
def get_space(arg0):
return arg0.space()
def sub(arg0, arg1):
try:
if not arg0.__class__ is pw_aff:
@ -3346,8 +3334,6 @@ isl.isl_pw_aff_scale_val.restype = c_void_p
isl.isl_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
isl.isl_pw_aff_scale_down_val.restype = c_void_p
isl.isl_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
isl.isl_pw_aff_get_space.restype = c_void_p
isl.isl_pw_aff_get_space.argtypes = [c_void_p]
isl.isl_pw_aff_sub.restype = c_void_p
isl.isl_pw_aff_sub.argtypes = [c_void_p, c_void_p]
isl.isl_pw_aff_subtract_domain.restype = c_void_p
@ -8649,17 +8635,6 @@ class map(union_map):
res = isl.isl_map_min_multi_pw_aff(isl.isl_map_copy(arg0.ptr))
obj = multi_pw_aff(ctx=ctx, ptr=res)
return obj
def n_basic_map(arg0):
try:
if not arg0.__class__ is map:
arg0 = map(arg0)
except:
raise
ctx = arg0.ctx
res = isl.isl_map_n_basic_map(arg0.ptr)
if res < 0:
raise
return int(res)
def polyhedral_hull(arg0):
try:
if not arg0.__class__ is map:
@ -9097,7 +9072,6 @@ isl.isl_map_max_multi_pw_aff.restype = c_void_p
isl.isl_map_max_multi_pw_aff.argtypes = [c_void_p]
isl.isl_map_min_multi_pw_aff.restype = c_void_p
isl.isl_map_min_multi_pw_aff.argtypes = [c_void_p]
isl.isl_map_n_basic_map.argtypes = [c_void_p]
isl.isl_map_polyhedral_hull.restype = c_void_p
isl.isl_map_polyhedral_hull.argtypes = [c_void_p]
isl.isl_map_preimage_domain_multi_aff.restype = c_void_p
@ -10564,17 +10538,6 @@ class set(union_set):
res = isl.isl_set_min_val(arg0.ptr, arg1.ptr)
obj = val(ctx=ctx, ptr=res)
return obj
def n_basic_set(arg0):
try:
if not arg0.__class__ is set:
arg0 = set(arg0)
except:
raise
ctx = arg0.ctx
res = isl.isl_set_n_basic_set(arg0.ptr)
if res < 0:
raise
return int(res)
def params(arg0):
try:
if not arg0.__class__ is set:
@ -10945,7 +10908,6 @@ isl.isl_set_min_multi_pw_aff.restype = c_void_p
isl.isl_set_min_multi_pw_aff.argtypes = [c_void_p]
isl.isl_set_min_val.restype = c_void_p
isl.isl_set_min_val.argtypes = [c_void_p, c_void_p]
isl.isl_set_n_basic_set.argtypes = [c_void_p]
isl.isl_set_params.restype = c_void_p
isl.isl_set_params.argtypes = [c_void_p]
isl.isl_set_get_plain_multi_val_if_fixed.restype = c_void_p

View File

@ -541,7 +541,7 @@ static Signature map_from_range_and_domain =
static Signature map_from_domain_and_range =
{ { Domain, Range }, { { Domain }, { Range } } };
/* Signatures for creating an anonymous set from a parameter set
/* Signatures for creating an anonymous set from a parameter set.
* or a map from a domain, where the range is anonymous.
*/
static Signature anonymous_set_from_params = { { Anonymous }, { { } } };
@ -592,7 +592,7 @@ static std::vector<Signature> fn_domain = { domain, set_params };
*/
static Signature map_reverse = { { Range, Domain }, { { Domain, Range } } };
static Signature map_range_reverse =
{ { Domain, { Range2, Range } }, { { Domain, { Range, Range2 } } } };
{ { Domain, { Range, Range2} }, { { Domain, { Range2, Range} } } };
/* Signatures for constructing products.
*/
@ -850,10 +850,10 @@ member_methods {
{ "range_lattice_tile", { un_map } },
{ "range_map", { range_map } },
{ "range_product", { range_product } },
{ "range_reverse", { map_range_reverse } },
{ "range_simple_fixed_box_hull",
{ un_map } },
{ "reverse", { map_reverse } },
{ "range_reverse", { map_range_reverse } },
{ "scale", bin_val },
{ "scale_down", bin_val },
{ "set_at", set_at },

View File

@ -1526,9 +1526,6 @@ static isl_bool has_redundant_cuts(struct isl_coalesce_info *info)
* If "add_valid" is set, then the offending constraints are
* simply removed.
*
* If the facet turns out to be empty, then no wrapping can be performed.
* This is considered a failure, unless "add_valid" is set.
*
* If any of the cut constraints of info->bmap turn out
* to be redundant with respect to other constraints
* then these will neither be wrapped nor added directly to the result.
@ -1553,11 +1550,6 @@ static isl_stat add_selected_wraps_around_facet(struct isl_wraps *wraps,
return isl_stat_error;
if (isl_tab_detect_redundant(info->tab) < 0)
return isl_stat_error;
if (info->tab->empty) {
if (!add_valid)
return wraps_mark_failed(wraps);
return isl_stat_ok;
}
nowrap = has_redundant_cuts(info);
if (nowrap < 0)
return isl_stat_error;

View File

@ -42,6 +42,3 @@ struct isl_ctx {
};
int isl_ctx_next_operation(isl_ctx *ctx);
void isl_ctx_set_full_error(isl_ctx *ctx, enum isl_error error, const char *msg,
const char *file, int line);

View File

@ -509,9 +509,7 @@ static __isl_give isl_pw_aff *accept_affine_factor(__isl_keep isl_stream *s,
aff = isl_aff_zero_on_domain(isl_local_space_from_space(isl_space_copy(space)));
if (!aff)
goto error;
aff->v = isl_vec_set_element_si(aff->v, 2 + pos, 1);
if (!aff->v)
aff = isl_aff_free(aff);
isl_int_set_si(aff->v->el[2 + pos], 1);
res = isl_pw_aff_from_aff(aff);
isl_token_free(tok);
} else if (tok->type == ISL_TOKEN_VALUE) {
@ -3681,9 +3679,6 @@ static __isl_give isl_multi_pw_aff *extract_mpa_from_tuple(
* through a call to extract_mpa_from_tuple.
* The result is converted to an isl_pw_multi_aff and
* its domain is intersected with the domain.
*
* Note that the last tuple may introduce new identifiers,
* but these cannot be referenced in the description of the domain.
*/
static __isl_give isl_pw_multi_aff *read_conditional_multi_aff(
__isl_keep isl_stream *s, __isl_take isl_set *dom, struct vars *v)
@ -3692,16 +3687,13 @@ static __isl_give isl_pw_multi_aff *read_conditional_multi_aff(
isl_multi_pw_aff *mpa;
isl_pw_multi_aff *pma;
int n = v->n;
int n_dom;
n_dom = v->n;
tuple = read_tuple(s, v, 0, 0);
if (!tuple)
goto error;
if (isl_stream_eat_if_available(s, ISL_TOKEN_TO)) {
isl_map *map = map_from_tuple(tuple, dom, isl_dim_in, v, 0);
dom = isl_map_domain(map);
n_dom = v->n;
tuple = read_tuple(s, v, 0, 0);
if (!tuple)
goto error;
@ -3711,7 +3703,6 @@ static __isl_give isl_pw_multi_aff *read_conditional_multi_aff(
if (!mpa)
dom = isl_set_free(dom);
vars_drop(v, v->n - n_dom);
dom = read_optional_formula(s, dom, v, 0);
vars_drop(v, v->n - n);
@ -3996,14 +3987,10 @@ __isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
* is then converted into the isl_multi_pw_aff through a call
* to extract_mpa_from_tuple and the domain of the result
* is intersected with the domain.
*
* Note that the last tuple may introduce new identifiers,
* but these cannot be referenced in the description of the domain.
*/
__isl_give isl_multi_pw_aff *isl_stream_read_multi_pw_aff(
__isl_keep isl_stream *s)
{
int n_dom;
struct vars *v;
isl_set *dom = NULL;
isl_multi_pw_aff *tuple = NULL;
@ -4022,20 +4009,17 @@ __isl_give isl_multi_pw_aff *isl_stream_read_multi_pw_aff(
if (isl_stream_eat(s, '{'))
goto error;
n_dom = v->n;
tuple = read_tuple(s, v, 0, 0);
if (!tuple)
goto error;
if (isl_stream_eat_if_available(s, ISL_TOKEN_TO)) {
isl_map *map = map_from_tuple(tuple, dom, isl_dim_in, v, 0);
dom = isl_map_domain(map);
n_dom = v->n;
tuple = read_tuple(s, v, 0, 0);
if (!tuple)
goto error;
}
vars_drop(v, v->n - n_dom);
if (isl_stream_eat_if_available(s, ':'))
dom = read_formula(s, v, dom, 0);

View File

@ -1106,7 +1106,7 @@ static isl_stat project_out_fixed(struct isl_sched_node *node,
* If any of the sizes turns out to be zero, then this means
* that this dimension has a fixed value in terms of
* the other dimensions. Perform an (extra) compression
* to remove this dimension.
* to remove this dimensions.
*/
static isl_stat compute_sizes(struct isl_sched_node *node,
__isl_keep isl_set *uncompressed)

View File

@ -9,12 +9,11 @@
#include <ctype.h>
#include <string.h>
#include <isl_ctx_private.h>
#include <isl/ctx.h>
#include <isl_stream_private.h>
#include <isl/map.h>
#include <isl/aff.h>
#include <isl_val_private.h>
#include <isl_options_private.h>
struct isl_keyword {
char *name;
@ -135,12 +134,6 @@ void isl_stream_error(__isl_keep isl_stream *s, struct isl_token *tok,
{
int line = tok ? tok->line : s->line;
int col = tok ? tok->col : s->col;
isl_ctx_set_full_error(s->ctx, isl_error_invalid, "syntax error",
__FILE__, __LINE__);
if (s->ctx->opt->on_error == ISL_ON_ERROR_CONTINUE)
return;
fprintf(stderr, "syntax error (%d, %d): %s\n", line, col, msg);
if (tok) {
if (tok->type < 256)
@ -172,8 +165,6 @@ void isl_stream_error(__isl_keep isl_stream *s, struct isl_token *tok,
else
fprintf(stderr, "got token type %d\n", tok->type);
}
if (s->ctx->opt->on_error == ISL_ON_ERROR_ABORT)
abort();
}
static __isl_give isl_stream* isl_stream_new(struct isl_ctx *ctx)

View File

@ -135,8 +135,6 @@ static const char *reparse_multi_pw_aff_tests[] = {
"[N] -> { [N] : N >= 0 }",
"[N] -> { [N, N + 1] : N >= 0 }",
"[N, M] -> { [(N : N >= 0), (M : M >= 0)] : N + M >= 0 }",
"{ [a] -> [b = a] }",
"{ [a] -> [b = a] : a >= 0 }",
};
#undef BASE
@ -145,16 +143,6 @@ static const char *reparse_multi_pw_aff_tests[] = {
#include "check_reparse_templ.c"
#include "check_reparse_test_templ.c"
/* String descriptions that cannot be parsed
* as multi piecewise affine expressions.
*/
static const char *parse_multi_pw_aff_fail_tests[] = {
"{ [a] -> [b] : b = a }",
"{ [a] -> [b = a] : b >= 0 }",
};
#include "check_parse_fail_test_templ.c"
/* String descriptions of piecewise multi affine expressions
* that are used for testing printing and parsing.
*/
@ -196,31 +184,6 @@ static isl_stat test_parse_pma(isl_ctx *ctx)
return isl_stat_ok;
}
/* String descriptions that cannot be parsed
* as union piecewise multi affine expressions.
*/
static const char *parse_union_pw_multi_aff_fail_tests[] = {
"{ [a] -> [b] : b = a }",
"{ [a] -> [b = a] : b >= 0 }",
};
#undef BASE
#define BASE union_pw_multi_aff
#include "check_parse_fail_test_templ.c"
/* Test parsing of union piecewise multi affine expressions.
*
* In particular, check some cases where parsing is supposed to fail.
*/
static isl_stat test_parse_upma(isl_ctx *ctx)
{
if (check_parse_union_pw_multi_aff_fail_tests(ctx) < 0)
return isl_stat_error;
return isl_stat_ok;
}
/* Test parsing of multi piecewise affine expressions by printing
* the expressions and checking that parsing the output results
* in the same expression.
@ -228,8 +191,6 @@ static isl_stat test_parse_upma(isl_ctx *ctx)
* an expression converted from a map with an output dimension name
* that is equal to an automatically generated name, and
* a set of expressions parsed from strings.
*
* Additionally, check some cases where parsing is supposed to fail.
*/
static int test_parse_mpa(isl_ctx *ctx)
{
@ -266,8 +227,6 @@ static int test_parse_mpa(isl_ctx *ctx)
if (check_reparse_multi_pw_aff_tests(ctx) < 0)
return -1;
if (check_parse_multi_pw_aff_fail_tests(ctx) < 0)
return -1;
return 0;
}
@ -459,8 +418,6 @@ int test_parse(struct isl_ctx *ctx)
return -1;
if (test_parse_pma(ctx) < 0)
return -1;
if (test_parse_upma(ctx) < 0)
return -1;
str = "{ [i] -> [-i] }";
map = isl_map_read_from_str(ctx, str);
@ -2418,43 +2375,30 @@ static int test_coalesce_special(struct isl_ctx *ctx)
return 0;
}
/* Check that the union of the basic sets described by "str1" and "str2"
* can be coalesced.
* The explicit call to isl_basic_set_union prevents the implicit
* equality constraints in the basic maps from being detected prior
* to the call to isl_set_coalesce, at least at the point
* where this function was introduced.
*/
static isl_stat test_coalesce_union(isl_ctx *ctx, const char *str1,
const char *str2)
{
isl_basic_set *bset1, *bset2;
isl_set *set;
bset1 = isl_basic_set_read_from_str(ctx, str1);
bset2 = isl_basic_set_read_from_str(ctx, str2);
set = isl_basic_set_union(bset1, bset2);
set = isl_set_coalesce(set);
isl_set_free(set);
return isl_stat_non_null(set);
}
/* A specialized coalescing test case that would result in an assertion
* in an earlier version of isl. Use test_coalesce_union with
* an explicit call to isl_basic_set_union to prevent the implicit
* in an earlier version of isl.
* The explicit call to isl_basic_set_union prevents the implicit
* equality constraints in the first basic map from being detected prior
* to the call to isl_set_coalesce, at least at the point
* where this test case was introduced.
*/
static isl_stat test_coalesce_special2(struct isl_ctx *ctx)
static int test_coalesce_special2(struct isl_ctx *ctx)
{
const char *str1;
const char *str2;
const char *str;
isl_basic_set *bset1, *bset2;
isl_set *set;
str1 = "{ [x, y] : x, y >= 0 and x + 2y <= 1 and 2x + y <= 1 }";
str2 = "{ [x,0] : -1 <= x <= 1 and x mod 2 = 1 }";
return test_coalesce_union(ctx, str1, str2);
str = "{ [x, y] : x, y >= 0 and x + 2y <= 1 and 2x + y <= 1 }";
bset1 = isl_basic_set_read_from_str(ctx, str);
str = "{ [x,0] : -1 <= x <= 1 and x mod 2 = 1 }" ;
bset2 = isl_basic_set_read_from_str(ctx, str);
set = isl_basic_set_union(bset1, bset2);
set = isl_set_coalesce(set);
isl_set_free(set);
if (!set)
return -1;
return 0;
}
/* Check that calling isl_set_coalesce does not leave other sets
@ -2566,25 +2510,6 @@ static isl_stat test_coalesce_special6(isl_ctx *ctx)
return test_coalesce_intersection(ctx, s1, s2);
}
/* A specialized coalescing test case that would result in an assertion failure
* in an earlier version of isl. Use test_coalesce_union with
* an explicit call to isl_basic_set_union to prevent the implicit
* equality constraints in the basic maps from being detected prior
* to the call to isl_set_coalesce, at least at the point
* where this test case was introduced.
*/
static isl_stat test_coalesce_special7(isl_ctx *ctx)
{
const char *str1;
const char *str2;
str1 = "{ [a, b, c=0:17] : a <= 7 and 2b <= 11 - a and "
"c <= -7 + 2a and 2c >= - 3 + 3a - 2b }";
str2 = "{ [a, b, c] : c > -15a and c >= -7 + 2a and c < 0 and "
"3c <= -5 + 5a - 3b and 2b >= 11 - a }";
return test_coalesce_union(ctx, str1, str2);
}
/* Test the functionality of isl_set_coalesce.
* That is, check that the output is always equal to the input
* and in some cases that the result consists of a single disjunct.
@ -2614,8 +2539,6 @@ static int test_coalesce(struct isl_ctx *ctx)
return -1;
if (test_coalesce_special6(ctx) < 0)
return -1;
if (test_coalesce_special7(ctx) < 0)
return -1;
return 0;

View File

@ -1,4 +1,4 @@
# In earlier versions of isl, this test case would take an inordinate
# In earlier version of isl, this test case would take an inordinate
# amount of time (in the order of 30s versus 0.1s in later versions)
# due to a call to isl_basic_set_coefficients.
# Check that this no longer happens in the sense that this test case