[PATCH/RFC] PR target/15130 SH: A tail call optimization

Kaz Kojima kkojima@rr.iij4u.or.jp
Thu May 6 00:51:00 GMT 2004


Joern Rennecke <joern.rennecke@superh.com> wrote:
> What we really should be doing is tell sh_expand_epilogue if it is working
> on a sibcall.  There are three calling sites:
> - The sh.md "epilogue" expander.  This is called for ordinary epilogues.
> - The sh.md "sibcall_epilogue" expander.
> - sh_need_epilogue, which only tests if there is any code at all, and
>   then throws it away.  You can just pretend that this is not a sibcall
>   there.
> 
> sibcall_epilogue can pass a HARD_REG_SET* to sh_expand_epilogue to indicate
> exactly which registers it has used, or might be used for parameter
> passing / the static chain; this set will have to be or-ed into the
> set passed to output_stack_adjust.  The other callers can pass NULL
> to indicate that this is not a sibcall.

Excellent!  I thought that it would be not easy to get this "sibcall_usage"
set at sibcall_epilogue.  How can it be done?

Regards,
	kaz



More information about the Gcc-patches mailing list