summaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 20:28:10 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-13 20:28:10 +0000
commit3d1f79d15d5dbd8e6b7604dc1648e6dc8867c0d0 (patch)
treea12f2f6f9dffc7b11511ffdc586964dff8accd59 /gcc/lra-assigns.c
parent1d2fa40afe7865c788059ee10813e0def3f503dd (diff)
downloadgcc-3d1f79d15d5dbd8e6b7604dc1648e6dc8867c0d0.tar.gz
2014-06-13 Vladimir Makarov <vmakarov@redhat.com>
* lra-assign.c (assign_by_spills): Add code to assign vector regs to inheritance pseudos. * config/i386/i386.c (ix86_spill_class): Add check on NO_REGS. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211655 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r--gcc/lra-assigns.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index 03c2506d826..cea4c33b9aa 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -1420,6 +1420,31 @@ assign_by_spills (void)
alternatives of insns containing the pseudo. */
bitmap_set_bit (&changed_pseudo_bitmap, regno);
}
+ else
+ {
+ enum reg_class rclass = lra_get_allocno_class (regno);
+ enum reg_class spill_class;
+
+ if (lra_reg_info[regno].restore_regno < 0
+ || ! bitmap_bit_p (&lra_inheritance_pseudos, regno)
+ || (spill_class
+ = ((enum reg_class)
+ targetm.spill_class
+ ((reg_class_t) rclass,
+ PSEUDO_REGNO_MODE (regno)))) == NO_REGS)
+ continue;
+ regno_allocno_class_array[regno] = spill_class;
+ hard_regno = find_hard_regno_for (regno, &cost, -1, false);
+ if (hard_regno < 0)
+ regno_allocno_class_array[regno] = rclass;
+ else
+ {
+ setup_reg_classes
+ (regno, spill_class, spill_class, spill_class);
+ assign_hard_regno (hard_regno, regno);
+ bitmap_set_bit (&changed_pseudo_bitmap, regno);
+ }
+ }
}
}
free (update_hard_regno_preference_check);