aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2009-10-23 03:43:14 +0000
committerJeff Law <law@redhat.com>2009-10-23 03:43:14 +0000
commitdc67971ccffcddcb739fc03b0f561d5b12156c6f (patch)
tree4892b18235641740a7dc4b8fb22a1dd5935436b7
parent5726146988b3c4d5dea66f151fb2a2b25126ce77 (diff)
* ira-lives.c (process_single_reg_class_operands): Update the
hard reg costs for all the hard registers desired by the single reg class operand. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@153487 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ira-lives.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b48375b5718..e5c26798384 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-22 Jeff Law <law@redhat.com>
+
+ * ira-lives.c (process_single_reg_class_operands): Update the
+ hard reg costs for all the hard registers desired by the
+ single reg class operand.
+
2009-10-22 Richard Sandiford <rdsandiford@googlemail.com>
* simplify-rtx.c (simplify_replace_fn_rtx): Add a fallback case
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 822dccb18d5..c67e89cbd79 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -841,6 +841,7 @@ process_single_reg_class_operands (bool in_p, int freq)
[ira_class_hard_regs[cl][0]]) >= 0
&& reg_class_size[cl] <= (unsigned) CLASS_MAX_NREGS (cl, mode))
{
+ int i, size;
cost
= (freq
* (in_p
@@ -848,10 +849,12 @@ process_single_reg_class_operands (bool in_p, int freq)
: ira_get_register_move_cost (mode, cl, cover_class)));
ira_allocate_and_set_costs
(&ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a), cover_class, 0);
- ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a)
- [ira_class_hard_reg_index
- [cover_class][ira_class_hard_regs[cl][0]]]
- -= cost;
+ size = ira_reg_class_nregs[cover_class][mode];
+ for (i = 0; i < size; i++)
+ ALLOCNO_CONFLICT_HARD_REG_COSTS (operand_a)
+ [ira_class_hard_reg_index
+ [cover_class][ira_class_hard_regs[cl][i]]]
+ -= cost;
}
}