From: Morten Sylvest Olsen <pbk1105@pbk.dk>
To: <gcc-help@gcc.gnu.org>
Subject: sibling call optimization
Date: Mon, 22 Oct 2001 05:35:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.33.0110221431190.15752-100000@venus.pbk.dk> (raw)
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.
reply other threads:[~2001-10-22 5:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.33.0110221431190.15752-100000@venus.pbk.dk \
--to=pbk1105@pbk.dk \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).