From 954f18a4343d43a77a806ea3e5d764e1fcbdbbe0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 2 Jan 2014 08:50:38 +0100 Subject: [PATCH] tree2scop.c: scop_from_infinite_loop: delay construction of body pet_scop We want to change the extraction of a pet_scop from a pet_tree from a bottom-up to a top-down process. In particular, we want to pass down the domain information derived from outer constructs to inner constructs. This means we have to construct the pet_scop for the body after the domain has been constructed. Signed-off-by: Sven Verdoolaege --- tree2scop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree2scop.c b/tree2scop.c index e6dfc17..91ce9d8 100644 --- a/tree2scop.c +++ b/tree2scop.c @@ -423,13 +423,13 @@ static struct pet_scop *scop_from_infinite_loop(__isl_keep pet_tree *body, int has_affine_break; int has_var_break; - scop = scop_from_tree(body, pc, state); - ctx = pet_tree_get_ctx(body); id = isl_id_alloc(ctx, "t", NULL); domain = infinite_domain(isl_id_copy(id)); ident = identity_aff(domain); + scop = scop_from_tree(body, pc, state); + has_affine_break = pet_scop_has_affine_skip(scop, pet_skip_later); if (has_affine_break) skip = pet_scop_get_affine_skip_domain(scop, pet_skip_later); -- 2.11.4.GIT