Message ID | 20221011210156.7710-3-palmer@rivosinc.com |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2297526wrs; Tue, 11 Oct 2022 14:05:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5FKlY1xIVO/xprynHimVbGxAa18xLovj/m4VdcqvWzr3vvlKCxC7UhuuTSrU2oyo1uKhto X-Received: by 2002:a17:907:97d0:b0:787:c0e9:ed0e with SMTP id js16-20020a17090797d000b00787c0e9ed0emr20722282ejc.274.1665522330308; Tue, 11 Oct 2022 14:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665522330; cv=none; d=google.com; s=arc-20160816; b=p91EzwwoIdPqeI22UnJ+c7N0LRsg89/0hq+N8Uu8NjlZfkXlW/w1zFlUN7920b3FJG MuO9ZKWd29TqDFBhtTfry/hcCJRPCKYpmKTF0QZLSmYdQVuDiDW6QFY8ZG4CtxJ+b+z2 gxb6fwBI3xGRz+7LPM8Pp6FquN6rRv7bLKZV/bAD9iDI/fukBoKFOm2QFVzGnia3FUn5 H1/HPZEEQmavW6dNgt3hmYgZYzl+SEAEwtZHy0xnfKQ7HN55dovw7WpijctWNv9SCLUw yffHejXRasFvySe0cFv9tvferz6kOwUp4Kr4BCRrR3FPJcTCe4/XfXCJkzldNrfVGPmX zmiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:dkim-signature:dmarc-filter:delivered-to; bh=JBsa+jw9mdF17bnwxJBSR2nJ34Uct+l3ZW158HlhlXc=; b=gEZw7k2khaEEnJPVPC+t3uKthC5YoIlsr5jdaOu2I+4y9CFwtau/t85cJWilY+MuZ8 lD1Voa9WdaQu9FaKQMjG3EzMTq5CBGHsNJfXqplbBt8+ND/R4AlnYIDVSqQqxZcizCTG bB2xmmla2H74Tg2j6NzrK00GGY6U/u7gRgENHZ+0gKPaBQk5OeISceNzRtZqwM8MPjk0 wjR+KxX071Gd2w+QU8Z+J03HxKoP1kCkgimdxaUeE4m3OwzMbN8MtLbrDQExLV6CLDq8 UtAhVkfjDjxZBXNKc0kpbv84wqG6kltZAFwN5VWwLyVWzE/4/qQODkaOOcXt8fthwJXu xEPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=BcfZelK9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id y22-20020a056402359600b0044900e60983si13648698edc.541.2022.10.11.14.05.30 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 14:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=BcfZelK9; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 236C0385086E for <ouuuleilei@gmail.com>; Tue, 11 Oct 2022 21:03:54 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 5DBF43854159 for <gcc-patches@gcc.gnu.org>; Tue, 11 Oct 2022 21:02:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5DBF43854159 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x1029.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so124434pjl.3 for <gcc-patches@gcc.gnu.org>; Tue, 11 Oct 2022 14:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:from:to:cc:subject:date :message-id:reply-to; bh=JBsa+jw9mdF17bnwxJBSR2nJ34Uct+l3ZW158HlhlXc=; b=BcfZelK9sFF0Bm9DTjlfcIuoq6X3B+bNccj/uzQGf6P4xlEA3nLosct/7qtjBOAFZb Dy0m/biPYuRlKO6GFWKbfup9cyC8iaxkqmxF8pZ0fdZ+8wWvgNeJntRgxy7mitpACg1b HqTib7AGwHea2GprdoHICl2eu1ipYmahLiFppVhf1315yQ0DHabfLE1uCxynhVBeclQ3 kw1kbxhLQPtTv8mZdiayD2DKE/W4bPD47iK4egJ2skDTeN1wpJE1nby1WtXDh0xwy0Vh 585cRe1VOwvIDrWT8bOr/HBl7nPxaBNpJL6bAr5/scgA4rWaFVv+eXjm7o/hKie+W6tz 2QFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JBsa+jw9mdF17bnwxJBSR2nJ34Uct+l3ZW158HlhlXc=; b=tW57psmi1I7eLb3/9+sTAITLkucPMJR9m0lRtv00l+sGV+uwhQrLaEWIpOJfpahdtn ig9vFk4VO8AWgMAUQMb/xyQEoPk5sw64aSX0Fb7arTgQhkZprBrjajB+Vp9gkEu9LgWA lm/Eh6V6Nbajm+NorQsrZ63HLZzoDXgm+QTJSa5xCdxt8N+7EtSRrTO1pxf380rnGcHV yrUVGwSh2gLj24r5GRpiqzKmeiuvY9pEZHX52xdpzCiTFT/qDomvcbcOztuxlftyqIRB UT1eouTpajgWwi0L43NOZYQOprTYkgtusyBJnQbGdU68L7RkrKvMKIsbvtnRA3VE5znh u+/g== X-Gm-Message-State: ACrzQf06iKdI6DDvOfP2Ww9fQ37LE/0ft0Ygh3J6gt7ylSXAhq/aO27e 0ipo7udnbEBGbA7uZT8kuNC21Q== X-Received: by 2002:a17:90b:2246:b0:201:d6d6:9809 with SMTP id hk6-20020a17090b224600b00201d6d69809mr1171107pjb.159.1665522174343; Tue, 11 Oct 2022 14:02:54 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id u8-20020a17090341c800b00172f4835f53sm7368467ple.192.2022.10.11.14.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 14:02:53 -0700 (PDT) Subject: [PATCH v2 2/3] doc: -falign-functions is ignored under -Os Date: Tue, 11 Oct 2022 14:01:55 -0700 Message-Id: <20221011210156.7710-3-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221011210156.7710-1-palmer@rivosinc.com> References: <20221011210156.7710-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Palmer Dabbelt <palmer@rivosinc.com> To: richard.guenther@gmail.com, hubicka@ucw.cz, gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 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 Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746426743210912683?= X-GMAIL-MSGID: =?utf-8?q?1746426743210912683?= |
Series |
doc: -falign-functions improvements
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Palmer Dabbelt
Oct. 11, 2022, 9:01 p.m. UTC
This is implicitly mentioned in the docs, but there were some questions in a recent patch. This makes it more exlicit that -falign-functions is meant to be ignored under -Os. gcc/doc/ChangeLog * invoke.texi (-falign-functions): Mention -Os --- gcc/doc/invoke.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Tue, Oct 11, 2022 at 5:03 PM Palmer Dabbelt <palmer@rivosinc.com> wrote: > > This is implicitly mentioned in the docs, but there were some questions > in a recent patch. This makes it more exlicit that -falign-functions is > meant to be ignored under -Os. > > gcc/doc/ChangeLog > > * invoke.texi (-falign-functions): Mention -Os Since there's -Oz now, too, should that be mentioned as well? > --- > gcc/doc/invoke.texi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 8326a60dcf1..a24798d5029 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -13164,7 +13164,8 @@ equivalent and mean that functions are not aligned. > If @var{n} is not specified or is zero, use a machine-dependent default. > The maximum allowed @var{n} option value is 65536. > > -Enabled at levels @option{-O2}, @option{-O3}. > +Enabled at levels @option{-O2}, @option{-O3}. This has no behavior under under > +@option{-Os}. > > @item -flimit-function-alignment > If this option is enabled, the compiler tries to avoid unnecessarily > -- > 2.34.1 >
> This is implicitly mentioned in the docs, but there were some questions > in a recent patch. This makes it more exlicit that -falign-functions is > meant to be ignored under -Os. > > gcc/doc/ChangeLog > > * invoke.texi (-falign-functions): Mention -Os > --- > gcc/doc/invoke.texi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 8326a60dcf1..a24798d5029 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -13164,7 +13164,8 @@ equivalent and mean that functions are not aligned. > If @var{n} is not specified or is zero, use a machine-dependent default. > The maximum allowed @var{n} option value is 65536. > > -Enabled at levels @option{-O2}, @option{-O3}. > +Enabled at levels @option{-O2}, @option{-O3}. This has no behavior under under > +@option{-Os}. Maybe we could instead say that the function alignment is included for functions optimized for size. This can happen by -Os, -Oz, cold attribute or because we auto-detect function as cold (i.e. it unavoidably leads to abort or is only called on such paths) It would be also nice to mention that for other alignment options (align jumps, loops and labels are ignored when given jump, loop or label is optimized for size). Honza > > @item -flimit-function-alignment > If this option is enabled, the compiler tries to avoid unnecessarily > -- > 2.34.1 >
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8326a60dcf1..a24798d5029 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13164,7 +13164,8 @@ equivalent and mean that functions are not aligned. If @var{n} is not specified or is zero, use a machine-dependent default. The maximum allowed @var{n} option value is 65536. -Enabled at levels @option{-O2}, @option{-O3}. +Enabled at levels @option{-O2}, @option{-O3}. This has no behavior under under +@option{-Os}. @item -flimit-function-alignment If this option is enabled, the compiler tries to avoid unnecessarily