From 5f481c8769ee19a15779eb4d39d69a2313997234 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 4 Jan 2014 11:25:53 +0100 Subject: [PATCH] PetScan::extract_scop: clear writes at outer level Before this commit, we would only clear writes inside the bodies of other constructs. This means that variables that get written somewhere inside the tree may initially get treated as parameters. This is not so much of a problem now, but in a subsequent commit, we will start plugging in affine expressions and then we do not want these variables to be treated as parameters as they would then incorrectly be considered affine. Signed-off-by: Sven Verdoolaege --- scan.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/scan.cc b/scan.cc index 3d020b1..c601812 100644 --- a/scan.cc +++ b/scan.cc @@ -1589,6 +1589,7 @@ struct pet_scop *PetScan::extract_scop(__isl_take pet_tree *tree) domain = isl_set_universe(isl_space_set_alloc(ctx, 0, 0)); pc = pet_context_alloc(domain); + pc = pet_context_clear_writes_in_tree(pc, tree); scop = pet_scop_from_pet_tree(tree, int_size, &::extract_array, this, pc); scop = pet_scop_detect_parameter_accesses(scop); -- 2.11.4.GIT