From 10f82112f18d000d333daedaae1cce620b22ea0f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 9 Apr 2014 16:30:05 +0200 Subject: [PATCH] pet_expr_access_update_domain: minor clean-up of expression arguments handling In particular, there is no need to extract the space to check if there are any arguments. Signed-off-by: Sven Verdoolaege --- expr.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/expr.c b/expr.c index aa97172..a1e9ab6 100644 --- a/expr.c +++ b/expr.c @@ -1299,8 +1299,6 @@ error: __isl_give pet_expr *pet_expr_access_update_domain(__isl_take pet_expr *expr, __isl_keep isl_multi_pw_aff *update) { - isl_space *space; - expr = pet_expr_cow(expr); if (!expr) return NULL; @@ -1310,12 +1308,12 @@ __isl_give pet_expr *pet_expr_access_update_domain(__isl_take pet_expr *expr, update = isl_multi_pw_aff_copy(update); - space = isl_map_get_space(expr->acc.access); - space = isl_space_domain(space); - if (!isl_space_is_wrapping(space)) - isl_space_free(space); - else { + if (expr->n_arg > 0) { + isl_space *space; isl_multi_pw_aff *id; + + space = isl_map_get_space(expr->acc.access); + space = isl_space_domain(space); space = isl_space_unwrap(space); space = isl_space_range(space); space = isl_space_map_from_set(space); -- 2.11.4.GIT