lra: consider clobbers when selecting hard_regno to spill
The idea behind the rclass loop in spill_hard_reg_in_range() seems to be: find a hard_regno, which in general conflicts with reload regno, but does not do so between `from` and `to`, and then do the live range splitting based on this information. To check the absence of conflicts, we make use of insn_bitmap, which does not contain insns which clobber the hard_regno. gcc/ChangeLog: 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com> PR target/86547 * lra-constraints.c (spill_hard_reg_in_range): When selecting the hard_regno, make sure no insn between `from` and `to` clobbers it. From-SVN: r263063
This commit is contained in:
parent
4cdfee3f20
commit
dc843a8597
2 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
|
||||
|
||||
PR target/86547
|
||||
* lra-constraints.c (spill_hard_reg_in_range): When selecting the
|
||||
hard_regno, make sure no insn between `from` and `to` clobbers it.
|
||||
|
||||
2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
|
||||
Tom de Vries <tdevries@suse.de>
|
||||
|
||||
|
|
|
@ -5722,9 +5722,19 @@ spill_hard_reg_in_range (int regno, enum reg_class rclass, rtx_insn *from, rtx_i
|
|||
|| TEST_HARD_REG_BIT (ignore, hard_regno))
|
||||
continue;
|
||||
for (insn = from; insn != NEXT_INSN (to); insn = NEXT_INSN (insn))
|
||||
if (bitmap_bit_p (&lra_reg_info[hard_regno].insn_bitmap,
|
||||
INSN_UID (insn)))
|
||||
break;
|
||||
{
|
||||
lra_insn_recog_data_t id = lra_insn_recog_data[uid = INSN_UID (insn)];
|
||||
struct lra_static_insn_data *static_id = id->insn_static_data;
|
||||
struct lra_insn_reg *reg;
|
||||
|
||||
if (bitmap_bit_p (&lra_reg_info[hard_regno].insn_bitmap, uid))
|
||||
break;
|
||||
for (reg = static_id->hard_regs; reg != NULL; reg = reg->next)
|
||||
if (reg->regno == hard_regno)
|
||||
break;
|
||||
if (reg != NULL)
|
||||
break;
|
||||
}
|
||||
if (insn != NEXT_INSN (to))
|
||||
continue;
|
||||
if (split_reg (TRUE, hard_regno, from, NULL, to))
|
||||
|
|
Loading…
Add table
Reference in a new issue