This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ia64 eh, part 6
- To: gcc-patches at gcc dot gnu dot org
- Subject: ia64 eh, part 6
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 27 Mar 2001 21:43:28 -0800
With the exception rewrite, we rely exclusively on REG_EH_REGION
in preference to NOTE_INSN_EH_REGION_BEG/END. This means we have
to be prepared for combine to want to redistribute one somewhere.
r~
* combine.c (distribute_notes) [REG_EH_REGION]: If non-call
exceptions, put the note on the trapping instruction.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.194
diff -c -p -d -r1.194 combine.c
*** combine.c 2001/03/26 16:59:23 1.194
--- combine.c 2001/03/28 05:39:29
*************** distribute_notes (notes, from_insn, i3,
*** 12074,12079 ****
--- 12074,12098 ----
break;
case REG_EH_REGION:
+ /* These notes must remain with the call or trapping instruction. */
+ if (GET_CODE (i3) == CALL_INSN)
+ place = i3;
+ else if (i2 && GET_CODE (i2) == CALL_INSN)
+ place = i2;
+ else if (flag_non_call_exceptions)
+ {
+ if (may_trap_p (i3))
+ place = i3;
+ else if (i2 && may_trap_p (i2))
+ place = i2;
+ /* ??? Otherwise assume we've combined things such that we
+ can now prove that the instructions can't trap. Drop the
+ note in this case. */
+ }
+ else
+ abort ();
+ break;
+
case REG_EH_RETHROW:
case REG_NORETURN:
/* These notes must remain with the call. It should not be