diff options
author | Richard Henderson <rth@redhat.com> | 2009-09-10 11:28:11 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-10 11:28:11 -0700 |
commit | 88e24a5ab99c76c81f32628af49e0a39147c95e8 (patch) | |
tree | 78d508c427e8f7f65d2142d82567fc6d4f13d7f9 | |
parent | 40a3286202dc309e499c21a1b26176a6460aabf4 (diff) | |
download | gcc-88e24a5ab99c76c81f32628af49e0a39147c95e8.zip gcc-88e24a5ab99c76c81f32628af49e0a39147c95e8.tar.gz gcc-88e24a5ab99c76c81f32628af49e0a39147c95e8.tar.bz2 |
tree-cfg.c (split_edge_bb_loc): Don't disallow placement at dest_prev if the edge is complex.
* tree-cfg.c (split_edge_bb_loc): Don't disallow placement at
dest_prev if the edge is complex.
From-SVN: r151606
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc595d3..edc610f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2009-09-10 Richard Henderson <rth@redhat.com> + * tree-cfg.c (split_edge_bb_loc): Don't disallow placement at + dest_prev if the edge is complex. + * tree-cfg.c (is_ctrl_stmt): Use a switch. * tree-cfg.c (gimple_can_merge_blocks_p): Move label and diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 98339b4..0718cfe 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2981,11 +2981,15 @@ static basic_block split_edge_bb_loc (edge edge_in) { basic_block dest = edge_in->dest; + basic_block dest_prev = dest->prev_bb; - if (dest->prev_bb && find_edge (dest->prev_bb, dest)) - return edge_in->src; - else - return dest->prev_bb; + if (dest_prev) + { + edge e = find_edge (dest_prev, dest); + if (e && !(e->flags & EDGE_COMPLEX)) + return edge_in->src; + } + return dest_prev; } /* Split a (typically critical) edge EDGE_IN. Return the new block. |