This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]