diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2014-12-17 21:25:18 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2014-12-17 21:25:18 +0000 |
commit | cdfc4dcf4814e6e96c464d9a1b7025a57867a5a3 (patch) | |
tree | 6bb070c307762898cfd11f8f02245b0e065ca865 | |
parent | f4e2df89707db4e673927962ca3a6fddf305b764 (diff) | |
download | gcc-cdfc4dcf4814e6e96c464d9a1b7025a57867a5a3.zip gcc-cdfc4dcf4814e6e96c464d9a1b7025a57867a5a3.tar.gz gcc-cdfc4dcf4814e6e96c464d9a1b7025a57867a5a3.tar.bz2 |
lra-constrints.c (process_alt_operands): Remove non allocatable hard regs when considering ira_prohibited_class_mode_regs.
2014-12-17 Vladimir Makarov <vmakarov@redhat.com>
* lra-constrints.c (process_alt_operands): Remove non allocatable
hard regs when considering ira_prohibited_class_mode_regs.
From-SVN: r218835
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 32 |
2 files changed, 24 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eb016cd..aef7f04 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-17 Vladimir Makarov <vmakarov@redhat.com> + + * lra-constrints.c (process_alt_operands): Remove non allocatable + hard regs when considering ira_prohibited_class_mode_regs. + 2014-12-17 Jan Hubicka <hubicka@ucw.cz> * sreal.h (sreal::normalize): Implement inline. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index a108b84..2526954 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2280,22 +2280,28 @@ process_alt_operands (int only_alternative) not hold the mode value. */ && ! HARD_REGNO_MODE_OK (ira_class_hard_regs [this_alternative][0], - GET_MODE (*curr_id->operand_loc[nop])) + GET_MODE (*curr_id->operand_loc[nop]))) + { + HARD_REG_SET temp; + + COPY_HARD_REG_SET (temp, this_alternative_set); + AND_COMPL_HARD_REG_SET (temp, lra_no_alloc_regs); /* The above condition is not enough as the first reg in ira_class_hard_regs can be not aligned for multi-words mode values. */ - && hard_reg_set_subset_p (this_alternative_set, - ira_prohibited_class_mode_regs - [this_alternative] - [GET_MODE (*curr_id->operand_loc[nop])])) - { - if (lra_dump_file != NULL) - fprintf - (lra_dump_file, - " alt=%d: reload pseudo for op %d " - " can not hold the mode value -- refuse\n", - nalt, nop); - goto fail; + if (hard_reg_set_subset_p (temp, + ira_prohibited_class_mode_regs + [this_alternative] + [GET_MODE (*curr_id->operand_loc[nop])])) + { + if (lra_dump_file != NULL) + fprintf + (lra_dump_file, + " alt=%d: reload pseudo for op %d " + " can not hold the mode value -- refuse\n", + nalt, nop); + goto fail; + } } /* Check strong discouragement of reload of non-constant |