Commit 89753b3a by Jakub Jelinek Committed by Jakub Jelinek

cfgrtl.c (purge_dead_edges): Remove REG_EH_REGION note for insns which cannot throw.

	* cfgrtl.c (purge_dead_edges): Remove REG_EH_REGION note for insns
	which cannot throw.

From-SVN: r46863
parent 6608bd4d
2001-11-09 Jakub Jelinek <jakub@redhat.com>
* cfgrtl.c (purge_dead_edges): Remove REG_EH_REGION note for insns
which cannot throw.
Thu Nov 8 18:00:55 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Thu Nov 8 18:00:55 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* explow.c (convert_memory_address, case SUBREG): Only return * explow.c (convert_memory_address, case SUBREG): Only return
......
...@@ -1819,7 +1819,7 @@ purge_dead_edges (bb) ...@@ -1819,7 +1819,7 @@ purge_dead_edges (bb)
basic_block bb; basic_block bb;
{ {
edge e, next; edge e, next;
rtx insn = bb->end; rtx insn = bb->end, note;
bool purged = false; bool purged = false;
if (GET_CODE (insn) == JUMP_INSN && !simplejump_p (insn)) if (GET_CODE (insn) == JUMP_INSN && !simplejump_p (insn))
...@@ -1878,6 +1878,17 @@ purge_dead_edges (bb) ...@@ -1878,6 +1878,17 @@ purge_dead_edges (bb)
return purged; return purged;
} }
/* If this instruction cannot trap, remove REG_EH_REGION notes. */
if (GET_CODE (insn) == INSN
&& (note = find_reg_note (insn, REG_EH_REGION, NULL)))
{
rtx eqnote;
if (! may_trap_p (PATTERN (insn))
|| ((eqnote = find_reg_equal_equiv_note (insn))
&& ! may_trap_p (XEXP (eqnote, 0))))
remove_note (insn, note);
}
/* Cleanup abnormal edges caused by throwing insns that have been /* Cleanup abnormal edges caused by throwing insns that have been
eliminated. */ eliminated. */
if (! can_throw_internal (bb->end)) if (! can_throw_internal (bb->end))
......
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