Commit 5a566bed by Mark Mitchell Committed by Mark Mitchell

* cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH.

From-SVN: r53521
parent 48f6efae
2002-05-16 Mark Mitchell <mark@codesourcery.com>
* cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH.
2002-05-16 Nick Clifton <nickc@cambridge.redhat.com> 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/arm.c (arm_rtx_costs): Check for RTX being a * config/arm/arm.c (arm_rtx_costs): Check for RTX being a
......
...@@ -2186,17 +2186,26 @@ purge_dead_edges (bb) ...@@ -2186,17 +2186,26 @@ purge_dead_edges (bb)
e->flags &= ~EDGE_ABNORMAL; e->flags &= ~EDGE_ABNORMAL;
/* Check purposes we can have edge. */ /* See if this edge is one we should keep. */
if ((e->flags & EDGE_FALLTHRU) if ((e->flags & EDGE_FALLTHRU) && any_condjump_p (insn))
&& any_condjump_p (insn)) /* A conditional jump can fall through into the next
block, so we should keep the edge. */
continue; continue;
else if (e->dest != EXIT_BLOCK_PTR else if (e->dest != EXIT_BLOCK_PTR
&& e->dest->head == JUMP_LABEL (insn)) && e->dest->head == JUMP_LABEL (insn))
/* If the destination block is the target of the jump,
keep the edge. */
continue;
else if (e->dest == EXIT_BLOCK_PTR && returnjump_p (insn))
/* If the destination block is the exit block, and this
instruction is a return, then keep the edge. */
continue; continue;
else if (e->dest == EXIT_BLOCK_PTR else if ((e->flags & EDGE_EH) && can_throw_internal (insn))
&& returnjump_p (insn)) /* Keep the edges that correspond to exceptions thrown by
this instruction. */
continue; continue;
/* We do not need this edge. */
bb->flags |= BB_DIRTY; bb->flags |= BB_DIRTY;
purged = true; purged = true;
remove_edge (e); remove_edge (e);
......
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