From fd8e60200a9fe3b9d66b8d61ebbac6096844df21 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 29 Jul 2014 11:11:16 +0200 Subject: [PATCH] isl_ast_codegen.c: create_node_scaled: hoist inclusion of stride guard In a future commit, we will want to exploit the fact that the stride guard is going to be added to simplify the guards of the child nodes. We first need to move the inclusion of the stride guard to a place where will be able to exploit it later. Signed-off-by: Sven Verdoolaege --- isl_ast_codegen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/isl_ast_codegen.c b/isl_ast_codegen.c index f5fe0b31..4dc89152 100644 --- a/isl_ast_codegen.c +++ b/isl_ast_codegen.c @@ -637,7 +637,6 @@ static __isl_give isl_ast_graft *refine_degenerate( return isl_ast_graft_free(graft); graft = add_degenerate_guard(graft, bounds, build); - graft = add_stride_guard(graft, build); return graft; } @@ -1207,7 +1206,6 @@ static __isl_give isl_ast_graft *refine_generic( isl_basic_set_free(bounds); graft = refine_generic_split(graft, list, domain, build); - graft = add_stride_guard(graft, build); return graft; } @@ -1374,8 +1372,10 @@ static __isl_give isl_ast_graft *create_node_scaled( graft = refine_degenerate(graft, bounds, build, sub_build); else graft = refine_generic(graft, bounds, domain, build); - if (!eliminated) + if (!eliminated) { + graft = add_stride_guard(graft, build); graft = after_each_for(graft, body_build); + } isl_ast_build_free(body_build); isl_ast_build_free(sub_build); -- 2.11.4.GIT