diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2014-01-21 19:15:40 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2014-01-21 19:15:40 +0000 |
commit | a9711f360bc99dee33c249e47caf9d5144ab0000 (patch) | |
tree | 459e1dcb7d902e824bd5c5d271e9cb7cf7978955 /gcc/lra-constraints.c | |
parent | f8ea7cb08dc13e3cb78bb3b4017c556c9838263b (diff) | |
download | gcc-a9711f360bc99dee33c249e47caf9d5144ab0000.zip gcc-a9711f360bc99dee33c249e47caf9d5144ab0000.tar.gz gcc-a9711f360bc99dee33c249e47caf9d5144ab0000.tar.bz2 |
re PR rtl-optimization/59858 (ICE: assign_by_spills, at lra-assigns.c:1283)
2014-01-21 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/59858
* lra-constraints.c (SMALL_REGISTER_CLASS_P): Use
ira_class_hard_regs_num.
(process_alt_operands): Increase reject for dying matched operand.
2014-01-21 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/59858
* gcc.target/arm/pr59858.c: New.
From-SVN: r206897
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index fd4a56a..7a2d065 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -688,9 +688,10 @@ operands_match_p (rtx x, rtx y, int y_hard_regno) /* True if C is a non-empty register class that has too few registers to be safely used as a reload target class. */ -#define SMALL_REGISTER_CLASS_P(C) \ - (reg_class_size [(C)] == 1 \ - || (reg_class_size [(C)] >= 1 && targetm.class_likely_spilled_p (C))) +#define SMALL_REGISTER_CLASS_P(C) \ + (ira_class_hard_regs_num [(C)] == 1 \ + || (ira_class_hard_regs_num [(C)] >= 1 \ + && targetm.class_likely_spilled_p (C))) /* If REG is a reload pseudo, try to make its class satisfying CL. */ static void @@ -2113,17 +2114,25 @@ 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, we do - not need to generate a reload insn for this - operand. */ - if (!(this_alternative_matches >= 0 - && !curr_alt_win[this_alternative_matches] - && REG_P (op) - && find_regno_note (curr_insn, REG_DEAD, REGNO (op)) - && (hard_regno[nop] >= 0 - ? in_hard_reg_set_p (this_alternative_set, - mode, hard_regno[nop]) - : in_class_p (op, this_alternative, NULL)))) + which failed to satisfy the own constraints, probably + the reload for this operand will be gone. */ + if (this_alternative_matches >= 0 + && !curr_alt_win[this_alternative_matches] + && REG_P (op) + && find_regno_note (curr_insn, REG_DEAD, REGNO (op)) + && (hard_regno[nop] >= 0 + ? in_hard_reg_set_p (this_alternative_set, + mode, hard_regno[nop]) + : in_class_p (op, this_alternative, NULL))) + { + if (lra_dump_file != NULL) + fprintf + (lra_dump_file, + " %d Dying matched operand reload: reject++\n", + nop); + reject++; + } + else { /* Strict_low_part requires to reload the register not the sub-register. In this case we should |