public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* sibling call optimization
@ 2001-10-22  5:35 Morten Sylvest Olsen
  0 siblings, 0 replies; only message in thread
From: Morten Sylvest Olsen @ 2001-10-22  5:35 UTC (permalink / raw)
  To: gcc-help

Hi all..

I'm trying to make a sibling call (or, rather making the GCC optimizer
make one) through a function pointer. This seems to be impossible?

I've read some old messages about the tailcall/siblingcalls that talked
about implementing an explicit __attribute__ or similar construct to tell
gcc to make a sibling call. This was never implemented, or?

Without knowing much about gcc internals, it seems to be this part of
gcc/calls.c responsible:

      /* If the register holding the address is a callee saved
	 register, then we lose.  We have no way to prevent that,
	 so we only allow calls to named functions.  */
      /* ??? This could be done by having the insn constraints
	 use a register class that is all call-clobbered.  Any
	 reload insns generated to fix things up would appear
	 before the sibcall_epilogue.  */
      || fndecl == NULL_TREE

Or maybe not, I've only looked at it very briefly.

- Morten

The only perfect science is hind-sight.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-22  5:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-22  5:35 sibling call optimization Morten Sylvest Olsen

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).