Commit 7657bf2f by Jim Wilson

(reload): Move assign_stack_local call into main loop.

From-SVN: r13671
parent 44cfd512
...@@ -747,11 +747,6 @@ reload (first, global, dumpfile) ...@@ -747,11 +747,6 @@ reload (first, global, dumpfile)
for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++) for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++)
alter_reg (i, -1); alter_reg (i, -1);
/* Round size of stack frame to BIGGEST_ALIGNMENT. This must be done here
because the stack size may be a part of the offset computation for
register elimination. */
assign_stack_local (BLKmode, 0, 0);
/* If we have some registers we think can be eliminated, scan all insns to /* If we have some registers we think can be eliminated, scan all insns to
see if there is an insn that sets one of these registers to something see if there is an insn that sets one of these registers to something
other than itself plus a constant. If so, the register cannot be other than itself plus a constant. If so, the register cannot be
...@@ -861,7 +856,7 @@ reload (first, global, dumpfile) ...@@ -861,7 +856,7 @@ reload (first, global, dumpfile)
rtx max_groups_insn[N_REG_CLASSES]; rtx max_groups_insn[N_REG_CLASSES];
rtx max_nongroups_insn[N_REG_CLASSES]; rtx max_nongroups_insn[N_REG_CLASSES];
rtx x; rtx x;
HOST_WIDE_INT starting_frame_size = get_frame_size (); HOST_WIDE_INT starting_frame_size;
int previous_frame_pointer_needed = frame_pointer_needed; int previous_frame_pointer_needed = frame_pointer_needed;
static char *reg_class_names[] = REG_CLASS_NAMES; static char *reg_class_names[] = REG_CLASS_NAMES;
...@@ -883,6 +878,14 @@ reload (first, global, dumpfile) ...@@ -883,6 +878,14 @@ reload (first, global, dumpfile)
changes from 0 to 1 in this pass. */ changes from 0 to 1 in this pass. */
new_basic_block_needs = 0; new_basic_block_needs = 0;
/* Round size of stack frame to BIGGEST_ALIGNMENT. This must be done
here because the stack size may be a part of the offset computation
for register elimination, and there might have been new stack slots
created in the last iteration of this loop. */
assign_stack_local (BLKmode, 0, 0);
starting_frame_size = get_frame_size ();
/* Reset all offsets on eliminable registers to their initial values. */ /* Reset all offsets on eliminable registers to their initial values. */
#ifdef ELIMINABLE_REGS #ifdef ELIMINABLE_REGS
for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++) for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment