From 71e134c8de0cc7710bdb22ee88a5492e196d18fe Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 15 Apr 2014 13:25:00 +0200 Subject: [PATCH] drop pet_expr_from_access_and_index When we split up access relations into may_read/may_write/must_write there will no longer be a single access relation. This function will therefore no longer be meaningful. Integrate the function into its only remaining user. Signed-off-by: Sven Verdoolaege --- expr.c | 21 +++++---------------- expr.h | 2 -- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/expr.c b/expr.c index 78cc714..ea3fc9e 100644 --- a/expr.c +++ b/expr.c @@ -176,21 +176,6 @@ error: return NULL; } -/* Construct an access pet_expr from an access relation and an index expression. - * By default, it is considered to be a read access. - */ -__isl_give pet_expr *pet_expr_from_access_and_index(__isl_take isl_map *access, - __isl_take isl_multi_pw_aff *index) -{ - int depth; - pet_expr *expr; - - expr = pet_expr_from_index(index); - depth = isl_map_dim(access, isl_dim_out); - expr = pet_expr_access_set_depth(expr, depth); - return pet_expr_access_set_access(expr, access); -} - /* Extend the range of "access" with "n" dimensions, retaining * the tuple identifier on this range. * @@ -268,14 +253,18 @@ __isl_give pet_expr *pet_expr_access_set_depth(__isl_take pet_expr *expr, __isl_give pet_expr *pet_expr_kill_from_access_and_index( __isl_take isl_map *access, __isl_take isl_multi_pw_aff *index) { + int depth; pet_expr *expr; if (!access || !index) goto error; - expr = pet_expr_from_access_and_index(access, index); + expr = pet_expr_from_index(index); expr = pet_expr_access_set_read(expr, 0); expr = pet_expr_access_set_kill(expr, 1); + depth = isl_map_dim(access, isl_dim_out); + expr = pet_expr_access_set_depth(expr, depth); + expr = pet_expr_access_set_access(expr, access); return pet_expr_new_unary(pet_op_kill, expr); error: isl_map_free(access); diff --git a/expr.h b/expr.h index 97f9b7f..5ad5858 100644 --- a/expr.h +++ b/expr.h @@ -104,8 +104,6 @@ enum pet_expr_type pet_str_type(const char *str); enum pet_op_type pet_str_op(const char *str); __isl_give pet_expr *pet_expr_alloc(isl_ctx *ctx, enum pet_expr_type type); -__isl_give pet_expr *pet_expr_from_access_and_index(__isl_take isl_map *access, - __isl_take isl_multi_pw_aff *index); __isl_give pet_expr *pet_expr_kill_from_access_and_index( __isl_take isl_map *access, __isl_take isl_multi_pw_aff *index); __isl_give pet_expr *pet_expr_new_unary(enum pet_op_type op, -- 2.11.4.GIT