[PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

Bernd Schmidt bschmidt@redhat.com
Mon Aug 29 09:31:00 GMT 2016


On 08/01/2016 03:42 AM, Segher Boessenkool wrote:
> +@deftypefn {Target Hook} void TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS (sbitmap)
> +Emit prologue insns for the components indicated by the parameter.
> +@end deftypefn
> +
> +@deftypefn {Target Hook} void TARGET_SHRINK_WRAP_EMIT_EPILOGUE_COMPONENTS (sbitmap)
> +Emit epilogue insns for the components indicated by the parameter.
> +@end deftypefn

How do these actually know where to save/restore registers? The frame 
pointer may have been eliminated, and SP isn't necessarily constant 
during the function. Seems like you'd have to calculate CFA reg/offset 
much like dwarf2out does and pass it to this hook.


Bernd



More information about the Gcc-patches mailing list