リビジョン | 743d9602b2607f78d71022e989e65258f13d60c7 (tree) |
---|---|
日時 | 2016-02-20 01:25:58 |
作者 | jakub <jakub@138b...> |
コミッター | jakub |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233562 138bc75d-0d04-0410-961f-82ee72b054a4
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2016-02-19 Jakub Jelinek <jakub@redhat.com> |
2 | 2 | |
3 | + PR middle-end/69838 | |
4 | + * lra.c (lra_process_new_insns): If non-call exceptions are enabled, | |
5 | + call copy_reg_eh_region_note_forward on before and/or after sequences | |
6 | + and remove note from insn if it no longer can throw. | |
7 | + | |
3 | 8 | PR target/69820 |
4 | 9 | * config/i386/sse.md (VI_512): Only include V64QImode and V32HImode |
5 | 10 | if TARGET_AVX512BW. |
@@ -1742,20 +1742,29 @@ lra_process_new_insns (rtx_insn *insn, rtx_insn *before, rtx_insn *after, | ||
1742 | 1742 | } |
1743 | 1743 | if (before != NULL_RTX) |
1744 | 1744 | { |
1745 | + if (cfun->can_throw_non_call_exceptions) | |
1746 | + copy_reg_eh_region_note_forward (insn, before, NULL); | |
1745 | 1747 | emit_insn_before (before, insn); |
1746 | 1748 | push_insns (PREV_INSN (insn), PREV_INSN (before)); |
1747 | 1749 | setup_sp_offset (before, PREV_INSN (insn)); |
1748 | 1750 | } |
1749 | 1751 | if (after != NULL_RTX) |
1750 | 1752 | { |
1753 | + if (cfun->can_throw_non_call_exceptions) | |
1754 | + copy_reg_eh_region_note_forward (insn, after, NULL); | |
1751 | 1755 | for (last = after; NEXT_INSN (last) != NULL_RTX; last = NEXT_INSN (last)) |
1752 | 1756 | ; |
1753 | 1757 | emit_insn_after (after, insn); |
1754 | 1758 | push_insns (last, insn); |
1755 | 1759 | setup_sp_offset (after, last); |
1756 | 1760 | } |
1761 | + if (cfun->can_throw_non_call_exceptions) | |
1762 | + { | |
1763 | + rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX); | |
1764 | + if (note && !insn_could_throw_p (insn)) | |
1765 | + remove_note (insn, note); | |
1766 | + } | |
1757 | 1767 | } |
1758 | - | |
1759 | 1768 | |
1760 | 1769 | |
1761 | 1770 | /* Replace all references to register OLD_REGNO in *LOC with pseudo |