diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/graphite-isl-ast-to-gimple.c | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b4735d..1bad16d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,11 @@ 2015-10-21 Aditya Kumar <aditya.k7@samsung.com> + Sebastian Pop <s.pop@samsung.com> + + * graphite-isl-ast-to-gimple.c (graphite_create_new_loop_guard): Do not call + create_empty_if_region_on_edge when cond_expr is true. + (translate_isl_ast_node_for): Check whether a guard has been generated. + +2015-10-21 Aditya Kumar <aditya.k7@samsung.com> * graphite-poly.h (struct dr_info): Added invalid_alias_set number. (operator=): Removed. diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c index 7f99bce..de28477 100644 --- a/gcc/graphite-isl-ast-to-gimple.c +++ b/gcc/graphite-isl-ast-to-gimple.c @@ -707,7 +707,10 @@ graphite_create_new_loop_guard (edge entry_edge, cond_expr = fold_build2 (LT_EXPR, boolean_type_node, *lb, ub_one); } - exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr); + if (integer_onep (cond_expr)) + exit_edge = entry_edge; + else + exit_edge = create_empty_if_region_on_edge (entry_edge, cond_expr); return exit_edge; } @@ -723,10 +726,14 @@ translate_isl_ast_node_for (loop_p context_loop, __isl_keep isl_ast_node *node, tree type, lb, ub; edge last_e = graphite_create_new_loop_guard (next_e, node, &type, &lb, &ub, ip); - edge true_e = get_true_edge_from_guard_bb (next_e->dest); - translate_isl_ast_for_loop (context_loop, node, true_e, - type, lb, ub, ip); + if (last_e == next_e) + /* There was no guard generated. */ + return translate_isl_ast_for_loop (context_loop, node, last_e, + type, lb, ub, ip); + + edge true_e = get_true_edge_from_guard_bb (next_e->dest); + translate_isl_ast_for_loop (context_loop, node, true_e, type, lb, ub, ip); return last_e; } |