diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2017-03-09 14:43:17 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2017-03-09 14:43:17 +0000 |
commit | 9125b9fc80f832228067dfabb6282a321b8844a8 (patch) | |
tree | 934e6b0492db7ae4ca9e86a848d8e923ceae86fd | |
parent | 16967aff7a209389283280a17ef08f2fe206fed3 (diff) | |
download | gcc-9125b9fc80f832228067dfabb6282a321b8844a8.zip gcc-9125b9fc80f832228067dfabb6282a321b8844a8.tar.gz gcc-9125b9fc80f832228067dfabb6282a321b8844a8.tar.bz2 |
re PR rtl-optimization/79949 (ICE in Max. number of generated reload insns per insn is achieved (90))
2017-03-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/79949
* lra-constraints.c (process_alt_operands): Check memory when
trying to predict a cycle. Print about the overall increase.
From-SVN: r246003
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 13 |
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7eab042..7c0bb71 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-09 Vladimir Makarov <vmakarov@redhat.com> + + PR rtl-optimization/79949 + * lra-constraints.c (process_alt_operands): Check memory when + trying to predict a cycle. Print about the overall increase. + 2017-03-09 Richard Biener <rguenther@suse.de> PR middle-end/79971 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 630261a..e0ce807 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2766,13 +2766,15 @@ process_alt_operands (int only_alternative) && REG_P (no_subreg_reg_operand[1]) /* Check that we reload memory not the memory address. */ - && !curr_alt_offmemok[0] + && ! (curr_alt_offmemok[0] + && MEM_P (no_subreg_reg_operand[0])) && reg_in_class_p (no_subreg_reg_operand[1], curr_alt[0])) || (curr_alt_win[0] && ! curr_alt_win[1] && REG_P (no_subreg_reg_operand[0]) /* Check that we reload memory not the memory address. */ - && !curr_alt_offmemok[1] + && ! (curr_alt_offmemok[1] + && MEM_P (no_subreg_reg_operand[1])) && reg_in_class_p (no_subreg_reg_operand[0], curr_alt[1]) && (! CONST_POOL_OK_P (curr_operand_mode[1], no_subreg_reg_operand[1]) @@ -2785,8 +2787,11 @@ process_alt_operands (int only_alternative) && GET_CODE (no_subreg_reg_operand[1]) != PLUS))) { /* We have a move insn and a new reload insn will be similar - to the current insn. We should avoid such situation as it - results in LRA cycling. */ + to the current insn. We should avoid such situation as + it results in LRA cycling. */ + if (lra_dump_file != NULL) + fprintf (lra_dump_file, + " Cycle danger: overall += LRA_MAX_REJECT\n"); overall += LRA_MAX_REJECT; } ok_p = true; |