2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
+ PR middle-end/43083
+ * graphite-scop-detection.c (create_single_exit_edge): Move
+ the call to find_single_exit_edge to....
+ (create_sese_edges): ...here. Don't handle multiple edges
+ exiting the function.
+ (build_graphite_scops): Don't handle multiple edges
+ exiting the function.
+
+ * gcc.dg/graphite/pr43083.c: New.
+
+2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
+
PR middle-end/43097
* sese.c (get_rename): Assert that old_name is an SSA_NAME.
(rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
edge forwarder = NULL;
basic_block exit;
- if (find_single_exit_edge (region))
- return;
-
/* We create a forwarder bb (5) for all edges leaving this region
(3->5, 4->5). All other edges leading to the same bb, are moved
to a new bb (6). If these edges where part of another region (2->5)
mark_exit_edges (regions);
for (i = 0; VEC_iterate (sd_region, regions, i, s); i++)
- create_single_exit_edge (s);
+ /* Don't handle multiple edges exiting the function. */
+ if (!find_single_exit_edge (s)
+ && s->exit != EXIT_BLOCK_PTR)
+ create_single_exit_edge (s);
unmark_exit_edges (regions);
{
edge entry = find_single_entry_edge (s);
edge exit = find_single_exit_edge (s);
- scop_p scop = new_scop (new_sese (entry, exit));
+ scop_p scop;
+
+ if (!exit)
+ continue;
+
+ scop = new_scop (new_sese (entry, exit));
VEC_safe_push (scop_p, heap, *scops, scop);
/* Are there overlapping SCoPs? */
canonicalize_loop_closed_ssa_form ();
build_scops_1 (single_succ (ENTRY_BLOCK_PTR), ENTRY_BLOCK_PTR->loop_father,
- ®ions, loop);
+ ®ions, loop);
create_sese_edges (regions);
build_graphite_scops (regions, scops);