From: Sven Verdoolaege Date: Thu, 4 Apr 2013 13:22:10 +0000 (+0200) Subject: isl_ast_graft.c: store_guard: coalesce guard after taking gist X-Git-Tag: isl-0.12~155 X-Git-Url: https://repo.or.cz/w/isl.git/commitdiff_plain/1815b1f908799391d4e87c2f73350885a693726b isl_ast_graft.c: store_guard: coalesce guard after taking gist On rare occasions, coalescing may simplify the gisted guard. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_ast_graft.c b/isl_ast_graft.c index c0fe818e..4ac773d3 100644 --- a/isl_ast_graft.c +++ b/isl_ast_graft.c @@ -686,7 +686,8 @@ static __isl_give isl_basic_set *extract_shared_enforced( /* Record "guard" in "graft" so that it will be enforced somewhere * up the tree. If the graft already has a guard, then it may be partially * redundant in combination with the new guard and in the context - * of build->domain. We therefore (re)compute the gist of the intersection. + * of build->domain. We therefore (re)compute the gist of the intersection + * and coalesce the result. */ static __isl_give isl_ast_graft *store_guard(__isl_take isl_ast_graft *graft, __isl_take isl_set *guard, __isl_keep isl_ast_build *build) @@ -706,6 +707,7 @@ static __isl_give isl_ast_graft *store_guard(__isl_take isl_ast_graft *graft, graft->guard = isl_set_intersect(graft->guard, guard); graft->guard = isl_ast_build_compute_gist(build, graft->guard); + graft->guard = isl_set_coalesce(graft->guard); if (!graft->guard) return isl_ast_graft_free(graft);