aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-11-09 00:14:26 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2001-11-09 00:14:26 +0100
commit89753b3a903366fb53a324206a176d53d04d419e (patch)
tree5b75760913631d837f1b6ed90a10cb8f7df5a438 /gcc
parent6608bd4de4b52a0519329caa878375641dbe9756 (diff)
downloadgcc-89753b3a903366fb53a324206a176d53d04d419e.zip
gcc-89753b3a903366fb53a324206a176d53d04d419e.tar.gz
gcc-89753b3a903366fb53a324206a176d53d04d419e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cfgrtl.c13
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 06fa1f6..6535209 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
* explow.c (convert_memory_address, case SUBREG): Only return
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 2987a50..5d785ca 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))