aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-09-08 21:21:10 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-09-08 21:21:10 +0000
commit99b96649c17e6a2f9b5e1427603d164ad752c15b (patch)
tree2f61713548e338b8a9f96569808848028cddddcb
parentb344d949d25164341ca4532ce067af1b254198a0 (diff)
downloadgcc-99b96649c17e6a2f9b5e1427603d164ad752c15b.zip
gcc-99b96649c17e6a2f9b5e1427603d164ad752c15b.tar.gz
gcc-99b96649c17e6a2f9b5e1427603d164ad752c15b.tar.bz2
ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the end of the search.
* ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the end of the search. From-SVN: r140121
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ira-color.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index abf03fd..2242afc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2008-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the
+ end of the search.
+
2008-09-08 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
* crx/crx.h (IRA_COVER_CLASSES): Define.
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 833048e..a161c08 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -2728,10 +2728,11 @@ ira_reuse_stack_slot (int regno, unsigned int inherent_size,
}
if (best_cost >= 0)
{
- slot = &ira_spilled_reg_stack_slots[best_slot_num];
+ slot_num = best_slot_num;
+ slot = &ira_spilled_reg_stack_slots[slot_num];
SET_REGNO_REG_SET (&slot->spilled_regs, regno);
x = slot->mem;
- ALLOCNO_HARD_REGNO (allocno) = -best_slot_num - 2;
+ ALLOCNO_HARD_REGNO (allocno) = -slot_num - 2;
}
}
if (x != NULL_RTX)