public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: rep.dot.nop@gmail.com
To: gcc-patches@gcc.gnu.org, Andi Kleen <ak@linux.intel.com>,
	gcc-patches@gnu.org
Subject: Re: [PATCH v2 5/5] Add documentation for musttail attribute
Date: Thu, 25 Jan 2024 07:51:21 +0100	[thread overview]
Message-ID: <0F9E0E84-EB23-4359-8FC2-3844FFF36BB6@gmail.com> (raw)
In-Reply-To: <20240124193134.622934-6-ak@linux.intel.com>

On 24 January 2024 20:30:45 CET, Andi Kleen <ak@linux.intel.com> wrote:
>---
> gcc/doc/extend.texi | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
>diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
>index 0bc586d120e7..c68d32bed8de 100644
>--- a/gcc/doc/extend.texi
>+++ b/gcc/doc/extend.texi
>@@ -9867,6 +9867,22 @@ foo (int x, int y)
> @code{y} is not actually incremented and the compiler can but does not
> have to optimize it to just @code{return 42 + 42;}.
> 
>+@cindex @code{musttail} statement attribute
>+@item musttail
>+
>+The @code{gnu::musttail} or @code{clang::hottail} attribute

AFAICS this patchset does not handle hottail ?

thanks,

>+can be applied to a return statement that returns the value
>+of a call to indicate that the call must be a tail call
>+that does not allocate extra stack space.
>+
>+@smallexample
>+[[gnu::musttail]] return foo();
>+@end smallexample
>+
>+If the compiler cannot generate a tail call it will generate
>+an error. Tail calls generally require enabling optimization.
>+On some targets they may not be supported.
>+
> @end table
> 
> @node Attribute Syntax


  reply	other threads:[~2024-01-25  6:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 19:30 Andi Kleen
2024-01-24 19:30 ` [PATCH v2 1/5] Improve must tail in RTL backend Andi Kleen
2024-01-24 19:30 ` [PATCH v2 2/5] C++: Support clang compatible [[musttail]] (PR83324) Andi Kleen
2024-01-24 19:30 ` [PATCH v2 3/5] C: Implement musttail attribute for returns Andi Kleen
2024-01-25 20:08   ` Joseph Myers
2024-01-25 20:39     ` Andi Kleen
2024-01-26  8:48       ` Joseph Myers
2024-01-26  9:13         ` Andi Kleen
2024-01-26  9:35           ` Joseph Myers
2024-01-24 19:30 ` [PATCH v2 4/5] Add tests for C/C++ musttail attributes Andi Kleen
2024-01-24 19:30 ` [PATCH v2 5/5] Add documentation for musttail attribute Andi Kleen
2024-01-25  6:51   ` rep.dot.nop [this message]
2024-01-25  8:48     ` Andi Kleen

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=0F9E0E84-EB23-4359-8FC2-3844FFF36BB6@gmail.com \
    --to=rep.dot.nop@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-patches@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).