From 82de0216c5b816fc3f0eec7d9df35bcb38283dbf Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 26 Mar 2014 12:59:41 +0100 Subject: [PATCH] pet_expr_tag_access: avoid use of target space In the next commit, we will change the functions that return access relations to differentiate between may_read, may_write and must_write and to return union maps instead of maps. This means that pet_expr_tag_access will return an isl_union_map and therefore also take an isl_union_map as input. We can then no longer refer to the target space of the access relation as there may be several target spaces. There is however no need to refer to this target space. Perform the tagging directly based on the domain space. Signed-off-by: Sven Verdoolaege --- expr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/expr.c b/expr.c index 7576409..0215ae0 100644 --- a/expr.c +++ b/expr.c @@ -1935,7 +1935,7 @@ __isl_give isl_map *pet_expr_tag_access(__isl_keep pet_expr *expr, __isl_take isl_map *access) { isl_space *space; - isl_map *add_tag; + isl_multi_aff *add_tag; isl_id *id; if (expr->type != pet_expr_access) @@ -1944,11 +1944,11 @@ __isl_give isl_map *pet_expr_tag_access(__isl_keep pet_expr *expr, return isl_map_free(access)); id = isl_id_copy(expr->acc.ref_id); - space = isl_space_range(isl_map_get_space(access)); - space = isl_space_from_range(space); - space = isl_space_set_tuple_id(space, isl_dim_in, id); - add_tag = isl_map_universe(space); - access = isl_map_domain_product(access, add_tag); + space = pet_expr_access_get_domain_space(expr); + space = isl_space_from_domain(space); + space = isl_space_set_tuple_id(space, isl_dim_out, id); + add_tag = isl_multi_aff_domain_map(space); + access = isl_map_preimage_domain_multi_aff(access, add_tag); return access; } -- 2.11.4.GIT