diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2010-05-20 22:49:07 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2010-05-20 16:49:07 -0600 |
commit | 0583835c7dac1e94dce3c6f83fdf3ba7c1a2ec7c (patch) | |
tree | ad5c9a81fe8ced03d64f7354f5cdb7c56da2c287 /gcc/ira.c | |
parent | 882b3d5c2e3be0b367f0eb9a9b94a99a1e22c60a (diff) | |
download | gcc-0583835c7dac1e94dce3c6f83fdf3ba7c1a2ec7c.zip gcc-0583835c7dac1e94dce3c6f83fdf3ba7c1a2ec7c.tar.gz gcc-0583835c7dac1e94dce3c6f83fdf3ba7c1a2ec7c.tar.bz2 |
ira.c (ira_non_ordered_class_hard_regs): Define.
* ira.c (ira_non_ordered_class_hard_regs): Define.
(setup_class_hard_regs): Initialize ira_non_ordered_class_hard_regs.
* ira-int.h (ira_non_ordered_class_hard_regs): Declare.
* ira-costs.c (ira_tune_allocno_costs_and_cover_classes): Increase
cost of unaligned hard regs when allocating multi-reg pseudos.
From-SVN: r159644
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -413,6 +413,11 @@ static HARD_REG_SET no_unit_alloc_regs; allocation order. */ short ira_class_hard_regs[N_REG_CLASSES][FIRST_PSEUDO_REGISTER]; +/* Array of the number of hard registers of given class which are + available for allocation. The order is defined by the + the hard register numbers. */ +short ira_non_ordered_class_hard_regs[N_REG_CLASSES][FIRST_PSEUDO_REGISTER]; + /* The number of elements of the above array for given register class. */ int ira_class_hard_regs_num[N_REG_CLASSES]; @@ -437,7 +442,10 @@ setup_class_hard_regs (void) AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs); CLEAR_HARD_REG_SET (processed_hard_reg_set); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - ira_class_hard_reg_index[cl][0] = -1; + { + ira_non_ordered_class_hard_regs[cl][0] = -1; + ira_class_hard_reg_index[cl][0] = -1; + } for (n = 0, i = 0; i < FIRST_PSEUDO_REGISTER; i++) { #ifdef REG_ALLOC_ORDER @@ -457,6 +465,10 @@ setup_class_hard_regs (void) } } ira_class_hard_regs_num[cl] = n; + for (n = 0, i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (TEST_HARD_REG_BIT (temp_hard_regset, i)) + ira_non_ordered_class_hard_regs[cl][n++] = i; + ira_assert (ira_class_hard_regs_num[cl] == n); } } |