public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Deciding when to sibcall
@ 2010-01-07  9:20 Paulo J. Matos
  2010-01-07 17:12 ` Dave Korn
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo J. Matos @ 2010-01-07  9:20 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-08 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07  9:20 Deciding when to sibcall Paulo J. Matos
2010-01-07 17:12 ` Dave Korn
2010-01-08 13:57   ` Paulo J. Matos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).