diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2014-04-02 20:55:02 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2014-04-02 20:55:02 +0000 |
commit | f4581282e57ef0f609b21be81e641911965c3bd8 (patch) | |
tree | a7d5d954780e636400f8827190e1f3240b9c4a2f /gcc/lra-constraints.c | |
parent | ab18f2f51cc15d464943663949d9872a15108b0a (diff) | |
download | gcc-f4581282e57ef0f609b21be81e641911965c3bd8.zip gcc-f4581282e57ef0f609b21be81e641911965c3bd8.tar.gz gcc-f4581282e57ef0f609b21be81e641911965c3bd8.tar.bz2 |
re PR rtl-optimization/60650 ([ARM] LRA ICE in assign_by_spills)
2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60650
* lra-constraints.c (process_alt_operands): Decrease reject for
earlyclobber matching.
2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60650
* gcc.target/arm/pr60650-2.c: New.
From-SVN: r209038
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index cfc3d7e..aac5087 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1747,12 +1747,27 @@ process_alt_operands (int only_alternative) [GET_MODE (*curr_id->operand_loc[m])]); } - /* We prefer no matching alternatives because - it gives more freedom in RA. */ - if (operand_reg[nop] == NULL_RTX - || (find_regno_note (curr_insn, REG_DEAD, - REGNO (operand_reg[nop])) - == NULL_RTX)) + /* Prefer matching earlyclobber alternative as + it results in less hard regs required for + the insn than a non-matching earlyclobber + alternative. */ + if (curr_static_id->operand[m].early_clobber) + { + if (lra_dump_file != NULL) + fprintf + (lra_dump_file, + " %d Matching earlyclobber alt:" + " reject--\n", + nop); + reject--; + } + /* Otherwise we prefer no matching + alternatives because it gives more freedom + in RA. */ + else if (operand_reg[nop] == NULL_RTX + || (find_regno_note (curr_insn, REG_DEAD, + REGNO (operand_reg[nop])) + == NULL_RTX)) { if (lra_dump_file != NULL) fprintf @@ -2143,7 +2158,7 @@ process_alt_operands (int only_alternative) } /* If the operand is dying, has a matching constraint, and satisfies constraints of the matched operand - which failed to satisfy the own constraints, probably + which failed to satisfy the own constraints, most probably the reload for this operand will be gone. */ if (this_alternative_matches >= 0 && !curr_alt_win[this_alternative_matches] |