From 2fcd4265625a26c1a21172d1cf70eebb89cc29e5 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 19 Jan 2012 14:46:07 +0100 Subject: [PATCH] PetScan::extract_for: compute gist before testing whether bound is simple We only need to check whether the constraint(s) in the loop condition that are not already implied by the initial value and the increment are simple. Signed-off-by: Sven Verdoolaege --- scan.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/scan.cc b/scan.cc index c295102..3f54d01 100644 --- a/scan.cc +++ b/scan.cc @@ -2121,6 +2121,7 @@ struct pet_scop *PetScan::extract_for(ForStmt *stmt) wrap = compute_wrapping(isl_set_get_space(cond), iv); cond = isl_set_apply(cond, isl_map_reverse(isl_map_copy(wrap))); } + cond = isl_set_gist(cond, isl_set_copy(domain)); is_simple = is_simple_bound(cond, inc); if (!is_simple) cond = valid_for_each_iteration(cond, -- 2.11.4.GIT