diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-02-23 12:59:48 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-02-23 12:59:48 +0000 |
commit | 4caa8e21cfe66d2ce6bd914f4b0edf9d0df54530 (patch) | |
tree | 64759a9b3771aac776fa4cce16b1cffeb41dc9a1 /gcc/graphite-scop-detection.c | |
parent | b8df8b8b99906651d07d38ad64cf5f11a5fb9c75 (diff) | |
download | gcc-4caa8e21cfe66d2ce6bd914f4b0edf9d0df54530.zip gcc-4caa8e21cfe66d2ce6bd914f4b0edf9d0df54530.tar.gz gcc-4caa8e21cfe66d2ce6bd914f4b0edf9d0df54530.tar.bz2 |
Fix PR43083: Do not handle regions ending with multiple edges on the exit BB.
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.
From-SVN: r156997
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r-- | gcc/graphite-scop-detection.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index d89f0f8..5c1dbbd 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -935,9 +935,6 @@ create_single_exit_edge (sd_region *region) 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) @@ -1031,7 +1028,10 @@ create_sese_edges (VEC (sd_region, heap) *regions) 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); @@ -1057,7 +1057,12 @@ build_graphite_scops (VEC (sd_region, heap) *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? */ @@ -1323,7 +1328,7 @@ build_scops (VEC (scop_p, heap) **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); |