diff options
author | Richard Henderson <rth@redhat.com> | 2001-03-27 21:40:43 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-03-27 21:40:43 -0800 |
commit | 662795a85f138c84aa9505ba731cf5fd25dd24eb (patch) | |
tree | 315bdef3a156c601c9cf983285baa76b52e8278d /gcc/combine.c | |
parent | 894d0e3925471409585a6bdcc7af6b24be670fbf (diff) | |
download | gcc-662795a85f138c84aa9505ba731cf5fd25dd24eb.zip gcc-662795a85f138c84aa9505ba731cf5fd25dd24eb.tar.gz gcc-662795a85f138c84aa9505ba731cf5fd25dd24eb.tar.bz2 |
combine.c (distribute_notes): If non-call exceptions, put the note on the trapping instruction.
* combine.c (distribute_notes) [REG_EH_REGION]: If non-call
exceptions, put the note on the trapping instruction.
From-SVN: r40907
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 4a148b9..4aa7721 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12074,6 +12074,25 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) 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 |