From ff3486c2252241572490b774dd79e0bbeeb0ee2a Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 4 Feb 2014 12:25:53 +0100 Subject: [PATCH] isl_ast_build_ast_from_schedule: coalesce input schedule This currently has little effect on the test cases, but without this change, the next commit would prevent the iftest2 case from being coalesced because some redundant explicit constraints get removed and this (now implicit) information is not preserved by explicit_bounds. Signed-off-by: Sven Verdoolaege --- isl_ast_codegen.c | 1 + test_inputs/codegen/unroll3.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/isl_ast_codegen.c b/isl_ast_codegen.c index 235e651d..3626b684 100644 --- a/isl_ast_codegen.c +++ b/isl_ast_codegen.c @@ -3803,6 +3803,7 @@ __isl_give isl_ast_node *isl_ast_build_ast_from_schedule( build = isl_ast_build_copy(build); build = isl_ast_build_set_single_valued(build, 0); + schedule = isl_union_map_coalesce(schedule); executed = isl_union_map_reverse(schedule); list = generate_code(executed, isl_ast_build_copy(build), 0); node = isl_ast_node_from_graft_list(list, build); diff --git a/test_inputs/codegen/unroll3.c b/test_inputs/codegen/unroll3.c index 95a30ba7..b67fb502 100644 --- a/test_inputs/codegen/unroll3.c +++ b/test_inputs/codegen/unroll3.c @@ -1,2 +1,2 @@ -if ((t1 + 121) % 128 <= 123) +if ((t1 + 125) % 128 >= 4) write_shared_A(((t1 + 125) % 128) - 3); -- 2.11.4.GIT