From 13ae713155a8b7c579f9c12a9bc8af51195747f9 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 14 Apr 2014 15:20:39 +0200 Subject: [PATCH] expr.c: access_add_ref_id: avoid using access relation In a future commit, we will only keep track of access relation(s) when they cannot be trivially derived from the index expression. Use pet_expr_get_ctx instead of extracting isl_ctx from access relation. Signed-off-by: Sven Verdoolaege --- expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expr.c b/expr.c index a1e9ab6..a9e2ff7 100644 --- a/expr.c +++ b/expr.c @@ -1516,7 +1516,7 @@ static __isl_give pet_expr *access_add_ref_id(__isl_take pet_expr *expr, isl_die(pet_expr_get_ctx(expr), isl_error_invalid, "not an access expression", return pet_expr_free(expr)); - ctx = isl_map_get_ctx(expr->acc.access); + ctx = pet_expr_get_ctx(expr); snprintf(name, sizeof(name), "__pet_ref_%d", (*n_ref)++); expr->acc.ref_id = isl_id_alloc(ctx, name, NULL); if (!expr->acc.ref_id) -- 2.11.4.GIT