non-local goto optimization

Eric Botcazou ebotcazou@libertysurf.fr
Mon Sep 10 08:19:00 GMT 2007


> Architecture maintainers CCed, your back-end tests the flag
>
>   current_function_has_nonlocal_label
>
> This flag used to instruct the middle-end to mark all call-saved registers
> as "ever live" and thus to force them to be saved and restored by the
> back-end.
>
> Thanks to Nathan's work, the middle-end is now more clever and doesn't
> always mark them if this flag is set; instead, it will think a little more
> and set an additional flag
>
>   current_function_saves_all_registers
>
> if it will eventually mark them.
>
>
> In order to implement this, current_function_has_nonlocal_label is set in
> exactly 1 less occasion than it used to, in expand_builtin_unwind_init.
> Instead current_function_saves_all_registers is set there.
>
> Therefore, the conservatively correct change is very likely to test
>
>   current_function_has_nonlocal_label ||
> current_function_saves_all_registers
>
> in your back-end.  However, your back-end could further benefit from
> Nathan's work by substituting the latter flag for the former in the
> test(s).

It's a heads-up to remind you of the above change, now implemented after some 
annoying delay.  To recap, the Alpha, ARM, MMIX, s390 and SH back-ends should 
be audited because they directly test current_function_has_nonlocal_label.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list