Hello,

I have been trying to implement sibcalls (you can see my digression
yesterday in gcc-help) for an arch with gcc 4.3.4.
The problem with this is that I only want to sibcall when it happens
to reduce my code size.

I noticed (in the internals manual) we cannot actually fallback to a
normal call once we decide to sibcall through FUNCTION_OK_FOR_SIBCALL,
however, FUNCTION_OK_FOR_SIBCALL is called during expansion which
doesn't provide me with as much information as I need to choose
between sibcalling or not. The best timing would be when the epilogue
is generated, but this doesn't seem possible.

One example of the kind of information is if some registers are ever
live. This changes in some cases between the expand pass and the
pro_and_epilogue pass. As well as the framesize. All of this
information is important to have as a precise instrument to decide if
sibcall should actually be done.

Any suggestion on how to achieve this?

-- 
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net

Reply via email to