diff options
author | Richard Henderson <rth@redhat.com> | 2009-09-14 12:18:58 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2009-09-14 12:18:58 -0700 |
commit | 1d65f45cfaefa060737af130c3fc69afb3030980 (patch) | |
tree | 2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/tree-cfgcleanup.c | |
parent | 0c433c31b31f25e3f18e58bd8d404c02722d7f7c (diff) | |
download | gcc-1d65f45cfaefa060737af130c3fc69afb3030980.zip gcc-1d65f45cfaefa060737af130c3fc69afb3030980.tar.gz gcc-1d65f45cfaefa060737af130c3fc69afb3030980.tar.bz2 |
Squash commit of EH in gimple
From-SVN: r151696
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 5cce1b6..d3a8ca9 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -239,6 +239,16 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) gcc_assert (bb != ENTRY_BLOCK_PTR); #endif + /* There should not be an edge coming from entry, or an EH edge. */ + { + edge_iterator ei; + edge e; + + FOR_EACH_EDGE (e, ei, bb->preds) + if (e->src == ENTRY_BLOCK_PTR || (e->flags & EDGE_EH)) + return false; + } + /* Now walk through the statements backward. We can ignore labels, anything else means this is not a forwarder block. */ for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi)) @@ -262,9 +272,6 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted) } } - if (find_edge (ENTRY_BLOCK_PTR, bb)) - return false; - if (current_loops) { basic_block dest; |