diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-02-19 17:25:58 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-02-19 17:25:58 +0100 |
commit | de4fcb999f51400b52d3b9b81606a57883c3c1ea (patch) | |
tree | e98c952fbd29c96afb4bdeec09d0b83795625bd1 /gcc/lra.c | |
parent | 03a616ac3662234f556ff7267d25ba842b7b5bab (diff) | |
download | gcc-de4fcb999f51400b52d3b9b81606a57883c3c1ea.tar.gz |
re PR middle-end/69838 (Lra deletes EH_REGION)
PR middle-end/69838
* lra.c (lra_process_new_insns): If non-call exceptions are enabled,
call copy_reg_eh_region_note_forward on before and/or after sequences
and remove note from insn if it no longer can throw.
From-SVN: r233562
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lra.c b/gcc/lra.c index ee92ca57e63..a6ce36529f8 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -1742,20 +1742,29 @@ lra_process_new_insns (rtx_insn *insn, rtx_insn *before, rtx_insn *after, } if (before != NULL_RTX) { + if (cfun->can_throw_non_call_exceptions) + copy_reg_eh_region_note_forward (insn, before, NULL); emit_insn_before (before, insn); push_insns (PREV_INSN (insn), PREV_INSN (before)); setup_sp_offset (before, PREV_INSN (insn)); } if (after != NULL_RTX) { + if (cfun->can_throw_non_call_exceptions) + copy_reg_eh_region_note_forward (insn, after, NULL); for (last = after; NEXT_INSN (last) != NULL_RTX; last = NEXT_INSN (last)) ; emit_insn_after (after, insn); push_insns (last, insn); setup_sp_offset (after, last); } + if (cfun->can_throw_non_call_exceptions) + { + rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); + if (note && !insn_could_throw_p (insn)) + remove_note (insn, note); + } } - /* Replace all references to register OLD_REGNO in *LOC with pseudo |