Message ID | 20240124193134.622934-6-ak@linux.intel.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1211285dyi; Wed, 24 Jan 2024 11:34:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPAQoHJLIMIZacZtDIgfwM3TWEg27wPlFdR6C44+z+zGgKFl8tSR12GFD5vDpfB5B5Cq8h X-Received: by 2002:a05:622a:181a:b0:42a:4eff:ab86 with SMTP id t26-20020a05622a181a00b0042a4effab86mr2867098qtc.96.1706124848586; Wed, 24 Jan 2024 11:34:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706124848; cv=pass; d=google.com; s=arc-20160816; b=qksky1mjhVNYGOMLSdsupbSaTHDnFBTCgv/Np2t1OowGeDDhYaH+oJjYtlyb2vjkVg DUtbyInNEOBhTBr/ahquLdT+iDiZvvzKmccRFgD0PwiKbMA7bvcLAyVCgVlPz625lObp mMP5nTo93zuZ4Pf8JCSvL4WXhJjlAsu90gYNbffCJOX/4dv3rH7C4Kc0EfD1YQBxEkHe yT0BlLsVmQklRVkF74/2FP26uKa4oe87ks1BaP9EpTkucRhol3s6HPeXVbGoqWgxWBMY bdKvI2wIAIheXoRhngwz8y6uMY3MDYYqR04XPy82TiMiEmubx/WGR35p+k8/FcMHRbjP NIYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=xVBVF0W7RohdAn3KHfniSkIhN0kRXY2gkZ+lN35lXAg=; fh=uXf1mgDAefpqDEGJDL9umcdF3eby/Gqhcj5QI8MxE/0=; b=tWPRv31j8S+SkyINNP6Gcerxe7LKFXOb7eLaZDataQmnYkd89oSfxfDbeDjB0YHYIg r7gnM7C2ew5UdKoYLDHPhabE2HFItFnTqkq/wqwXZoimcQT5o0T+s9bxZWY2x/aEn6Ew H7M291SmjigXbksHjUh77CMVNUHOCgJ4hV0j4PqwD6ZPfKPafvlC760mBFlZyhTdsRQY sHTVPMXndJE2jzw18SpZ8l/OPgET1b2tW24tsPddFLmXSpxJW5A0AYxqN+TWR7Chzv8h RucsBQGzSTXDkZvjtuTo1EYwfoj/Q0gD6ez5mb/kY4haXTeTEawOHS4q20dj1gzMcw5+ m5xA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eiI9Y4W8; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id o16-20020ac85a50000000b0042a589924a1si3141512qta.6.2024.01.24.11.34.08 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 11:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eiI9Y4W8; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4BDC23857730 for <ouuuleilei@gmail.com>; Wed, 24 Jan 2024 19:34:08 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 7C0DC3858420 for <gcc-patches@gcc.gnu.org>; Wed, 24 Jan 2024 19:31:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C0DC3858420 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C0DC3858420 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706124719; cv=none; b=RBoQZNn6Sowb2mhThXrl7mNWQLQ4xs1Fa1f8tNNGdKk7Nx8ZRnt7zckGBcpCoCw0FPlOqRh0YDKa+Z0rMvGLUZ52P2iDyE3iZNQk+yDnRuABKKWWirODqLVtPMJA+2NZw6Up+nz5VkZSX7MYJ4aUyDNarqgeFpEDPPww96+E2gg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706124719; c=relaxed/simple; bh=nTISuNEyjoXs+sCdvH4czB9Bp1Fhbe519Jqk0/temj8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pk+kcJ/j0d8Vobomwb+xegMu9CTU0MPPIRjsumYCvCwrMwodUHZSh7/a8vx5yzZO6+O79E7MYSlfXmaov8x7t96nj/lJWFHPBc7Ah1wEVwiuZasy3fvZTtvt5h43elOhFgx2K0kRg7HCLvnhFI05a0zCKzn+R5es4fXiRzt2SgM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mgamail.intel.com ([192.55.52.88]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ak@linux.intel.com>) id 1rSiyX-0007Ze-Iv for gcc-patches@gnu.org; Wed, 24 Jan 2024 14:31:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706124713; x=1737660713; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nTISuNEyjoXs+sCdvH4czB9Bp1Fhbe519Jqk0/temj8=; b=eiI9Y4W8THwNPfjc05ILwwVTWmtv0RrAIC+tyxaXaAkPnlDPn/PnRjV9 WZpjZHnotq8WbLAuo5FBAtfTolS25hlpvze/qT4/Uq6UJACnB74pPTSAG w+mspR6U9i0bh/OUIalqxUlFBFA1H2USS+UMQg7kdhUBTmC4giqrtekV4 8TT2GilaDAdixxYiBLks/eKhcIoG+LeiSAVF60e0uFrD1zka2eoAiejED k1nvvidAv2BrQPBg4+M5Om6a+beKZ4e4ggovC13bj/hSDMXZI/f1b/xbd i2SOFW4B62breAkjD29L4j770o18ph1SBJYGDSbx+TmoTD5PyHcG6fZFE w==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="433111211" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="433111211" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2024 11:31:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="856810885" X-IronPort-AV: E=Sophos;i="6.05,216,1701158400"; d="scan'208";a="856810885" Received: from tassilo.jf.intel.com ([10.54.38.190]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2024 11:31:43 -0800 From: Andi Kleen <ak@linux.intel.com> To: gcc-patches@gnu.org Cc: Andi Kleen <ak@linux.intel.com> Subject: [PATCH v2 5/5] Add documentation for musttail attribute Date: Wed, 24 Jan 2024 11:30:45 -0800 Message-ID: <20240124193134.622934-6-ak@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240124193134.622934-1-ak@linux.intel.com> References: <20240124193134.622934-1-ak@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=192.55.52.88; envelope-from=ak@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -57 X-Spam_score: -5.8 X-Spam_bar: ----- X-Spam_report: (-5.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789001568873615849 X-GMAIL-MSGID: 1789001568873615849 |
Series |
[v2,1/5] Improve must tail in RTL backend
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Andi Kleen
Jan. 24, 2024, 7:30 p.m. UTC
--- gcc/doc/extend.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Comments
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
On Thu, Jan 25, 2024 at 07:51:21AM +0100, rep.dot.nop@gmail.com wrote: > 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. Fixed the typo. -Andi
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 +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