From: Richard Henderson <rth@cygnus.com>
To: Jan Hubicka <hubicka@atrey.karlin.mff.cuni.cz>
Cc: egcs@egcs.cygnus.com
Subject: Re: tail calls in const functions?
Date: Fri, 24 Mar 2000 02:22:00 -0000 [thread overview]
Message-ID: <20000324022215.C19110@cygnus.com> (raw)
In-Reply-To: <20000323152431.C2277@atrey.karlin.mff.cuni.cz>
On Thu, Mar 23, 2000 at 03:24:31PM +0100, Jan Hubicka wrote:
> The tail call optimization makes function to modify the stack, that
> belongs to the caller. Is this valid for const function?
It doesn't belong to the caller. Not any more than
call-clobbered registers do.
> IMO gcc has right to optimize out:
> int test()
> {
> return c(1) + d(1);
> }
> the second store of 1, in case c is const function
I don't agree.
r~
prev parent reply other threads:[~2000-03-24 2:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-23 6:24 Jan Hubicka
2000-03-23 6:29 ` Jakub Jelinek
2000-03-23 6:43 ` Jan Hubicka
2000-03-23 9:09 ` Jeffrey A Law
2000-03-23 14:20 ` Jan Hubicka
2000-03-23 14:47 ` Jeffrey A Law
2000-03-24 2:22 ` Richard Henderson [this message]
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=20000324022215.C19110@cygnus.com \
--to=rth@cygnus.com \
--cc=egcs@egcs.cygnus.com \
--cc=hubicka@atrey.karlin.mff.cuni.cz \
/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).