Commit e5f9a909 by James E Wilson Committed by Jim Wilson

Rewrite fix for PR 17356, fix for enable checking ada build failure.

cfgrtl.c (purge_dead_edges): Undo last change.  In EDGE_EH code,
add check for CALL_INSN if EDGE_ABRNOMAL_CALL true.

From-SVN: r106297
parent d63f0fe5
2005-10-25 James E. Wilson <wilson@specifix.com>
PR rtl-optimization/17356
* cfgrtl.c (purge_dead_edges): Undo last change. In EDGE_EH code,
add check for CALL_INSN if EDGE_ABRNOMAL_CALL true.
2005-10-31 Jan Hubicka <jh@suse.cz> 2005-10-31 Jan Hubicka <jh@suse.cz>
PR middle-end/24093 PR middle-end/24093
......
...@@ -2294,23 +2294,25 @@ purge_dead_edges (basic_block bb) ...@@ -2294,23 +2294,25 @@ purge_dead_edges (basic_block bb)
/* Cleanup abnormal edges caused by exceptions or non-local gotos. */ /* Cleanup abnormal edges caused by exceptions or non-local gotos. */
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); ) for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{ {
/* We must check for the most restrictive condition first. Since /* There are three types of edges we need to handle correctly here: EH
an abnormal call edge is always an EH edge, but an EH edge is not edges, abnormal call EH edges, and abnormal call non-EH edges. The
always an abnormal call edge, we must check for an abnormal call latter can appear when nonlocal gotos are used. */
edge first. */ if (e->flags & EDGE_EH)
if (e->flags & EDGE_ABNORMAL_CALL)
{ {
if (CALL_P (BB_END (bb)) if (can_throw_internal (BB_END (bb))
&& (! (note = find_reg_note (insn, REG_EH_REGION, NULL)) /* If this is a call edge, verify that this is a call insn. */
|| INTVAL (XEXP (note, 0)) >= 0)) && (! (e->flags & EDGE_ABNORMAL_CALL)
|| CALL_P (BB_END (bb))))
{ {
ei_next (&ei); ei_next (&ei);
continue; continue;
} }
} }
else if (e->flags & EDGE_EH) else if (e->flags & EDGE_ABNORMAL_CALL)
{ {
if (can_throw_internal (BB_END (bb))) if (CALL_P (BB_END (bb))
&& (! (note = find_reg_note (insn, REG_EH_REGION, NULL))
|| INTVAL (XEXP (note, 0)) >= 0))
{ {
ei_next (&ei); ei_next (&ei);
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment