This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix nit on ira_reuse_stack_slot
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 7 Sep 2008 21:41:01 +0200
- Subject: [PATCH] Fix nit on ira_reuse_stack_slot
Hi,
ira_reuse_stack_slot prints the wrong slot number in the dump when it needs to
search for a reusable stack slot because it doesn't reset slot_num.
Bootstrapped/regtested on x86_64-suse-linux, OK for mainline?
2008-09-07 Eric Botcazou <ebotcazou@adacore.com>
* ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the
end of the search.
--
Eric Botcazou
Index: ira-color.c
===================================================================
--- ira-color.c (revision 140088)
+++ ira-color.c (working copy)
@@ -2728,10 +2728,11 @@ ira_reuse_stack_slot (int regno, unsigne
}
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)