From 94168d9ada6e7967e8b0ced05f386dd2c3825b67 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 22 Aug 2013 11:37:02 +0200 Subject: [PATCH] add pet_expr_access_get_tagged_may_access Signed-off-by: Sven Verdoolaege --- include/pet.h | 3 +++ scop.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/include/pet.h b/include/pet.h index 2b4d80c..99d7664 100644 --- a/include/pet.h +++ b/include/pet.h @@ -142,6 +142,9 @@ struct pet_expr { /* Return the potential read access relation of access expression "expr". */ __isl_give isl_map *pet_expr_access_get_may_access(struct pet_expr *expr); +/* Return the tagged potential read access relation of access "expr". */ +__isl_give isl_map *pet_expr_access_get_tagged_may_access( + struct pet_expr *expr); /* If the statement has arguments, i.e., n_arg != 0, then * "domain" is a wrapped map, mapping the iteration domain diff --git a/scop.c b/scop.c index 4979bff..60d1bc4 100644 --- a/scop.c +++ b/scop.c @@ -3382,6 +3382,24 @@ __isl_give isl_map *pet_expr_access_get_may_access(struct pet_expr *expr) return access; } +/* Return the relation mapping domain iterations to all possibly + * accessed data elements, with its domain tagged with the reference + * identifier. + */ +__isl_give isl_map *pet_expr_access_get_tagged_may_access( + struct pet_expr *expr) +{ + isl_map *access; + + if (!expr) + return NULL; + + access = pet_expr_access_get_may_access(expr); + access = tag_access(access, isl_id_copy(expr->acc.ref_id)); + + return access; +} + /* Add all read access relations (if "read" is set) and/or all write * access relations (if "write" is set) to "accesses" and return the result. * The domains of the access relations are intersected with "domain". -- 2.11.4.GIT