From 34273babd47f7d75652f6f1c0ac2cd0af30a0c67 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 16 Apr 2014 16:17:23 +0200 Subject: [PATCH] add pet_expr_access_get_augmented_domain_space We will need this function in two commits. Signed-off-by: Sven Verdoolaege --- expr.c | 16 ++++++++++++++-- expr.h | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/expr.c b/expr.c index 2aa2b7d..69c4923 100644 --- a/expr.c +++ b/expr.c @@ -1089,9 +1089,9 @@ __isl_give isl_space *pet_expr_access_get_parameter_space( return space; } -/* Return the domain space of "expr", without the arguments (if any). +/* Return the domain space of "expr", including the arguments (if any). */ -__isl_give isl_space *pet_expr_access_get_domain_space( +__isl_give isl_space *pet_expr_access_get_augmented_domain_space( __isl_keep pet_expr *expr) { isl_space *space; @@ -1104,6 +1104,18 @@ __isl_give isl_space *pet_expr_access_get_domain_space( space = isl_multi_pw_aff_get_space(expr->acc.index); space = isl_space_domain(space); + + return space; +} + +/* Return the domain space of "expr", without the arguments (if any). + */ +__isl_give isl_space *pet_expr_access_get_domain_space( + __isl_keep pet_expr *expr) +{ + isl_space *space; + + space = pet_expr_access_get_augmented_domain_space(expr); if (isl_space_is_wrapping(space)) space = isl_space_domain(isl_space_unwrap(space)); diff --git a/expr.h b/expr.h index b20503d..f65f46c 100644 --- a/expr.h +++ b/expr.h @@ -151,6 +151,8 @@ int pet_expr_is_equal(__isl_keep pet_expr *expr1, __isl_keep pet_expr *expr2); __isl_give isl_space *pet_expr_access_get_parameter_space( __isl_take pet_expr *expr); +__isl_give isl_space *pet_expr_access_get_augmented_domain_space( + __isl_keep pet_expr *expr); __isl_give isl_space *pet_expr_access_get_domain_space( __isl_keep pet_expr *expr); __isl_give isl_space *pet_expr_access_get_data_space(__isl_keep pet_expr *expr); -- 2.11.4.GIT