aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2009-09-14 12:18:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2009-09-14 12:18:58 -0700
commit1d65f45cfaefa060737af130c3fc69afb3030980 (patch)
tree2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/tree-cfgcleanup.c
parent0c433c31b31f25e3f18e58bd8d404c02722d7f7c (diff)
downloadgcc-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.c13
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;