From cd0fb83faa87756f5be6877c9614172684ed3153 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 27 Jun 2013 13:58:49 +0200 Subject: [PATCH] add pet_scop_get_skip_id Signed-off-by: Sven Verdoolaege --- scop.c | 16 ++++++++++++++++ scop.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/scop.c b/scop.c index 93b76b3..f41ba68 100644 --- a/scop.c +++ b/scop.c @@ -2097,6 +2097,22 @@ __isl_give isl_map *pet_scop_get_skip_map(struct pet_scop *scop, return isl_map_from_range(pet_scop_get_skip(scop, type)); } +/* Return the identifier of the variable that is accessed by + * the skip condition of the given type. + * + * The skip condition is assumed not to be an affine condition. + */ +__isl_give isl_id *pet_scop_get_skip_id(struct pet_scop *scop, + enum pet_skip type) +{ + struct pet_scop_ext *ext = (struct pet_scop_ext *) scop; + + if (!scop) + return NULL; + + return isl_set_get_tuple_id(ext->skip[type]); +} + /* Return an access pet_expr corresponding to the skip condition * of the given type. */ diff --git a/scop.h b/scop.h index 98b78f2..d2798ef 100644 --- a/scop.h +++ b/scop.h @@ -105,6 +105,8 @@ __isl_give isl_set *pet_scop_get_affine_skip_domain(struct pet_scop *scop, enum pet_skip type); __isl_give isl_map *pet_scop_get_skip_map(struct pet_scop *scop, enum pet_skip type); +__isl_give isl_id *pet_scop_get_skip_id(struct pet_scop *scop, + enum pet_skip type); struct pet_expr *pet_scop_get_skip_expr(struct pet_scop *scop, enum pet_skip type); void pet_scop_reset_skip(struct pet_scop *scop, enum pet_skip type); -- 2.11.4.GIT