From 123129e2225ad279ebe5925a405b1a061854b6f6 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 15 Dec 2012 14:44:55 +0100 Subject: [PATCH] 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 --- isl_input.c | 6 +++++- isl_test.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) 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; } -- 2.11.4.GIT