From: Sven Verdoolaege Date: Sat, 15 Dec 2012 13:44:55 +0000 (+0100) Subject: isl_stream_read_map: allow anonymous unconstrained dimensions X-Git-Tag: isl-0.12~216 X-Git-Url: https://repo.or.cz/w/isl.git/commitdiff_plain/123129e2225ad279ebe5925a405b1a061854b6f6 isl_stream_read_map: allow anonymous unconstrained dimensions In particular, allow a '*' in tuples to represent such anonymous unconstrained dimensions. The same syntax is used by Omega. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_input.c b/isl_input.c index f0c3d7ca..b032bf13 100644 --- a/isl_input.c +++ b/isl_input.c @@ -941,7 +941,11 @@ static __isl_give isl_multi_pw_aff *read_tuple_var_list(struct isl_stream *s, new_name = p >= n; } - if (new_name) { + if (tok->type == '*') { + if (vars_add_anon(v) < 0) + goto error; + isl_token_free(tok); + } else if (new_name) { res = tuple_set_dim_name(res, i, v->v->name); isl_token_free(tok); if (isl_stream_eat_if_available(s, '=')) diff --git a/isl_test.c b/isl_test.c index f0aee84e..f59db995 100644 --- a/isl_test.c +++ b/isl_test.c @@ -205,6 +205,9 @@ int test_parse(struct isl_ctx *ctx) "[n] -> { [i] : i <= n }") < 0) return -1; + if (test_parse_map_equal(ctx, "{ [*] }", "{ [a] }") < 0) + return -1; + return 0; }