diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-14 19:18:58 +0000 |
commit | e38def9ca7953bb5611d08ce8617249516ba5a99 (patch) | |
tree | 2fcbbb5f99b13293753d83230cf9f4e0893a9b51 /gcc/tree-cfgcleanup.c | |
parent | 74facf6eece2aa84e36088e8e9adf175920b2e8a (diff) | |
download | gcc-e38def9ca7953bb5611d08ce8617249516ba5a99.tar.gz |
Squash commit of EH in gimple
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151696 138bc75d-0d04-0410-961f-82ee72b054a4
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 5cce1b6eec7..d3a8ca91aa9 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; |