aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@cambridge.redhat.com>2001-04-30 16:07:26 +0000
committerAndrew Haley <aph@gcc.gnu.org>2001-04-30 16:07:26 +0000
commitd6e95df8d0586a49dc8a067d53762a0a28e1b608 (patch)
treeee1f064697ba64230461fd82561fa9fd768f6653 /gcc
parentd60e54483d5049e875f94c703f47738605633e51 (diff)
downloadgcc-d6e95df8d0586a49dc8a067d53762a0a28e1b608.zip
gcc-d6e95df8d0586a49dc8a067d53762a0a28e1b608.tar.gz
gcc-d6e95df8d0586a49dc8a067d53762a0a28e1b608.tar.bz2
emit-rtl.c (try_split): Copy EH notes to sequence.
2001-04-27 Andrew Haley <aph@cambridge.redhat.com> * emit-rtl.c (try_split): Copy EH notes to sequence. From-SVN: r41688
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/emit-rtl.c16
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 78c48762..3e8dd6e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-27 Andrew Haley <aph@cambridge.redhat.com>
+
+ * emit-rtl.c (try_split): Copy EH notes to sequence.
+
2001-04-30 Mark Mitchell <mark@codesourcery.com>
* regmove.c (record_stack_memrefs): Catch all references to the
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 6fe21ae..37df9a1 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2585,7 +2585,8 @@ try_split (pat, trial, last)
if (GET_CODE (seq) == SEQUENCE)
{
int i;
-
+ rtx eh_note;
+
/* Avoid infinite loop if any insn of the result matches
the original pattern. */
for (i = 0; i < XVECLEN (seq, 0); i++)
@@ -2607,6 +2608,19 @@ try_split (pat, trial, last)
CALL_INSN_FUNCTION_USAGE (XVECEXP (seq, 0, i))
= CALL_INSN_FUNCTION_USAGE (trial);
+ /* Copy EH notes. */
+ if ((eh_note = find_reg_note (trial, REG_EH_REGION, NULL_RTX)))
+ for (i = 0; i < XVECLEN (seq, 0); i++)
+ {
+ rtx insn = XVECEXP (seq, 0, i);
+ if (GET_CODE (insn) == CALL_INSN
+ || (flag_non_call_exceptions
+ && may_trap_p (PATTERN (insn))))
+ REG_NOTES (insn)
+ = gen_rtx_EXPR_LIST (REG_EH_REGION, XEXP (eh_note, 0),
+ REG_NOTES (insn));
+ }
+
/* If there are LABELS inside the split insns increment the
usage count so we don't delete the label. */
if (GET_CODE (trial) == INSN)