diff options
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index ce0b602..4321b08 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -702,6 +702,8 @@ has_nonexceptional_receiver (void) static int something_needs_elimination; /* Set during calculate_needs if an insn needs an operand changed. */ static int something_needs_operands_changed; +/* Set by alter_regs if we spilled a register to the stack. */ +static bool something_was_spilled; /* Nonzero means we couldn't get enough spill regs. */ static int failure; @@ -981,6 +983,7 @@ reload (rtx first, int global) HOST_WIDE_INT starting_frame_size; starting_frame_size = get_frame_size (); + something_was_spilled = false; set_initial_elim_offsets (); set_initial_label_offsets (); @@ -1046,7 +1049,7 @@ reload (rtx first, int global) setup_save_areas (); /* If we allocated another stack slot, redo elimination bookkeeping. */ - if (starting_frame_size != get_frame_size ()) + if (something_was_spilled || starting_frame_size != get_frame_size ()) continue; if (starting_frame_size && crtl->stack_alignment_needed) { @@ -1084,7 +1087,7 @@ reload (rtx first, int global) /* If we allocated any new memory locations, make another pass since it might have changed elimination offsets. */ - if (starting_frame_size != get_frame_size ()) + if (something_was_spilled || starting_frame_size != get_frame_size ()) something_changed = 1; /* Even if the frame size remained the same, we might still have @@ -2223,6 +2226,8 @@ alter_reg (int i, int from_reg, bool dont_share_p) unsigned int min_align = reg_max_ref_width[i] * BITS_PER_UNIT; int adjust = 0; + something_was_spilled = true; + if (ira_conflicts_p) { /* Mark the spill for IRA. */ |