public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Koning <paulkoning@comcast.net>
To: Florian Weimer <fweimer@redhat.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] middle-end/81035: Mention that noreturn suppresses tail call optimization
Date: Fri, 21 Sep 2018 18:36:00 -0000	[thread overview]
Message-ID: <386B7752-2567-4601-AE2C-89C359B3C432@comcast.net> (raw)
In-Reply-To: <87y3bu90ky.fsf@oldenburg.str.redhat.com>



> On Sep 21, 2018, at 2:17 PM, Florian Weimer <fweimer@redhat.com> wrote:
> 
> * Segher Boessenkool:
> 
>> On Fri, Sep 21, 2018 at 12:59:27PM +0200, Florian Weimer wrote:
>>> 2018-09-21  Florian Weimer  <fweimer@redhat.com>
>>> 
>>> 	PR middle-end/81035
>>> 	* doc/extend.texi (Common Function Attributes): Mention that
>>> 	noreturn suppresses tail call optimization.
>> 
>>> +In order to preserve backtraces, GCC will never turn calls to
>>> +@code{noreturn} functions into tail calls.
>> 
>> Should we document this?  Shouldn't we fix it, instead?
> 
> Fix how?  What is currently broken?
> 
> For things like assertion failures, we do not want to replace the
> current stack frame with that of __assert_fail, I think.

I agree.  Also, tailcalls are optimizations.  Speed optimizing noreturn calls is obviously not interesting.  Calls to noreturn functions are short, and turning them into a jump probably makes no difference in size, or if it does, not enough to matter.

	paul

  reply	other threads:[~2018-09-21 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 11:10 Florian Weimer
2018-09-21 18:16 ` Segher Boessenkool
2018-09-21 18:29   ` Florian Weimer
2018-09-21 18:36     ` Paul Koning [this message]
2018-09-21 18:40       ` Florian Weimer
2018-09-21 22:32         ` Segher Boessenkool
2018-09-21 19:44 ` Jeff Law

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=386B7752-2567-4601-AE2C-89C359B3C432@comcast.net \
    --to=paulkoning@comcast.net \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.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).