RFA [reload]: Fix PR other/58545

Jeff Law law@redhat.com
Fri Oct 11 05:20:00 GMT 2013


On 10/03/13 14:23, Joern Rennecke wrote:
> To make sure that reloading is done with up-to-date register eliminations,
> I call update_eliminables also in the code path that continues for a frame
> size change.  Not directly, since I need the code to spill the no longer
> eliminated registers; I've factored out this code into a new function
> update_eliminables_and_spill.
> Also, I move the frame size alignment code before the code that tests for
> a frame size change so that this is also covered with the enhanced check.
>
> In principle, we could inline update_eliminables into
> update_eliminables_and_spill now, since the former is only called from the
> latter, but I leave this to the bootstrap compiler so as not to break the
> connection between init_elim_table and update_eliminables.
>
> Regression tested on avr atmega128-sim.
>
> Bootstrapped and regtested on i686-pc-linux-gnu.
>
> OK to apply?
Isn't this going to result in more stack alignments (and thus unused 
slots on the stack).  In particular the current structure will do as 
much of the pseudo spilling, caller save setup, as possible.  Once those 
two steps stabilize, the stack is aligned and we proceed further into 
the main reload loop.

With your change it seems to me that we do a single round of spilling & 
caller-save setup, then align the stack, then restart.  The net result 
being we align the stack a lot more often.

Jeff



More information about the Gcc-patches mailing list