This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ira] patch for solving PR36028
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 06 May 2008 15:22:21 -0400
- Subject: [ira] patch for solving PR36028
The following patch solves PR36028. It was successfully bootstrapped
for x86_64 and tested for x86 with different option sets (including
-march=nocona).
2008-05-06 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/36028
* caller-save.c (setup_save_areas): Adjust reused stack slot.
Index: caller-save.c
===================================================================
--- caller-save.c (revision 134959)
+++ caller-save.c (working copy)
@@ -645,8 +645,10 @@ setup_save_areas (void)
<= GET_MODE_SIZE (regno_save_mode
[saved_reg2->hard_regno][1])))
{
- saved_reg->slot = slot;
- regno_save_mem[regno][1] = slot;
+ saved_reg->slot
+ = adjust_address_nv
+ (slot, regno_save_mode[saved_reg->hard_regno][1], 0);
+ regno_save_mem[regno][1] = saved_reg->slot;
saved_reg->next = saved_reg2->next;
saved_reg2->next = i;
if (dump_file != NULL)
@@ -673,6 +675,10 @@ setup_save_areas (void)
if (best_slot_num >= 0)
{
saved_reg->slot = prev_save_slots[best_slot_num];
+ saved_reg->slot
+ = adjust_address_nv
+ (saved_reg->slot,
+ regno_save_mode[saved_reg->hard_regno][1], 0);
if (dump_file != NULL)
fprintf (dump_file,
"%d uses a slot from prev iteration\n", regno);