Stack layout change during lra

Vladimir Makarov vmakarov@redhat.com
Wed Feb 19 15:41:00 GMT 2014


On 2/19/2014, 6:54 AM, Joey Ye wrote:
> Vlad,
>
> When fixing PR60169, I found that reload fail to assert
> verify_initial_elim_offsets ()
>    if (insns_need_reload != 0 || something_needs_elimination
>        || something_needs_operands_changed)
>      {
>        HOST_WIDE_INT old_frame_size = get_frame_size ();
>
>        reload_as_needed (global);
>
>        gcc_assert (old_frame_size == get_frame_size ());
>
>        gcc_assert (verify_initial_elim_offsets ());
>      }
>
> The reason is that stack layout changes during reload_as_needed as a result
> of a thumb1 backend heuristic.
>
> I have a patch to make sure the heuristic doesn't change stack layout during
> and after reload, and the assertion disappeared. However, I'm not sure if it
> will also be a problem in lra. Here is the question more specific:
>
> Is that any chance during lra_in_progress that: stack layout can no longer
> be altered, but insns can still be added or changed?
>

I believe LRA is less prone to the above reload problem because of its 
design.  You can change stack in the backend and all will work if you 
provide the right sfp to hfp/sp offsets.  In fact, LRA itself can 
allocate stack slots several times and add and change insns between 
these allocations.





More information about the Gcc mailing list