summaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-08 23:14:26 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-08 23:14:26 +0000
commit4a33fae653ecef6544b5da8f6b1e3d2206b9291f (patch)
tree5b75760913631d837f1b6ed90a10cb8f7df5a438 /gcc/cfgrtl.c
parent648818ad87fd45e64ccf62b2d9f63e90b18ad19c (diff)
downloadgcc-4a33fae653ecef6544b5da8f6b1e3d2206b9291f.tar.gz
* cfgrtl.c (purge_dead_edges): Remove REG_EH_REGION note for insns
which cannot throw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 2987a506618..5d785cafb50 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1819,7 +1819,7 @@ purge_dead_edges (bb)
basic_block bb;
{
edge e, next;
- rtx insn = bb->end;
+ rtx insn = bb->end, note;
bool purged = false;
if (GET_CODE (insn) == JUMP_INSN && !simplejump_p (insn))
@@ -1878,6 +1878,17 @@ purge_dead_edges (bb)
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
eliminated. */
if (! can_throw_internal (bb->end))