This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH/RFC] PR target/15130 SH: A tail call optimization
Joern Rennecke <firstname.lastname@example.org> 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
> 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?