From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id C008D3858D35 for ; Tue, 7 May 2024 06:34:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C008D3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C008D3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715063658; cv=none; b=k71/GJnH3Cg6/n+iFXinW7lSTn6/NWAY1oK+m8grb41W6EVTQaT9Tor04a1iEzNeZ3DiQYfr6BaOtBDLwYcggk//td9blXiNMmu/BKSBFNbL/J1sifezRNYy4c+cLLktFUfSRSt8SEqPXkIhMR7xHh/YIe+nm5kjR9Fu3XGSkiQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715063658; c=relaxed/simple; bh=Jp3dAFy9pzpvzksWZri5HvKK2MPiaEvtdYIR6PZQk8s=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=asVRaxR3pDHpJbtLxC0kQcZYHU9Sk1RX3NJKZmIHCS/EzBOnC0pY+KLvjD5SmgWtB7s3+X5eCYmXWcGULJjvp4esSdhDeWX3XJX89aoFBD5fv2M3qAxtsT9YZQDfLFDbwRIpE4LW+kKrEx7gSHwta6B9esIygoiblTmpWHfM89k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2db17e8767cso34027841fa.3 for ; Mon, 06 May 2024 23:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715063654; x=1715668454; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mL1GMwb0f2mCzTd1U5fOtLHxCr7JU3doj/IL6cJrfuQ=; b=lD9fZgQQcXBrQ0FCJ557WAzq07XdnJegunczZEPZoWM25vnVcDCMnDvOTFeTG9kY+f lQMUlflAKRXLf2maHLwmsDqnqKo2a8YN9wFlfCJKrEWBN6jqCHwfUAFNyNfkdxJWNgdp k9R9DEVJyoVzzuBNCil4se8OGVdlxPzZOjNQkRlM7PsY3AkosziaHsdq4DaALxATRdZa pLlFbGsz8zJc7zSq8SOi+PwpuR6CiddUsBHEW3Hry3AlJDMGGwfpbrRig8S+a7u094QU Jwnefv/KJQjJIIKXZAYiB0KZFRP+J/2QA6LrTV3h4RA7GVJyCydNL1eGOpKGTcV1/pkr MdYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715063654; x=1715668454; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mL1GMwb0f2mCzTd1U5fOtLHxCr7JU3doj/IL6cJrfuQ=; b=EJ+L2cClPl/UX06v6buaZQKZKhK991GCOGAvGxJJCktT0lFUFPo9HuAplcYSyVkZBf ghImjH3688V/j+gFBWiE5AZc/No/vWm8AYp6FX9bfenCpLW8L7TvE80Dim+jDVLj86Pd zpcUe3JfJ1CVEnP5rivxhQ50n91ez8ePehqunN/Ms/BxHZE9fMTtDFPt9sEhnqSgnIJF ui2QSFC8E3ZKXJicYLTur2sA7e6QJWvAZKltZ244QGq4AJAWU4yurLcM0YTsm8mgq8gw eXMjlCb++2PrKdfHkruoejvqsezzePqOmWy1ERfkwz6+Br2P1t5MQQIdcOapMG1rMH9f ks8w== X-Gm-Message-State: AOJu0Yx8pq7H0sZiMGJ7z4ms/3TkZzZtxjUjSVpsL075fQDl3pa0K43D DSDtYzfPA5ax6B5w79OVyNwlYW9kCb0XCDOvzOvhGkDFSIZp1dALzkNObupRAAsWRbrQAs5v2vw I2kkjf1UYWeS7YOMkuK4o+Ol3jss= X-Google-Smtp-Source: AGHT+IEP9QjtecCBdkiPKgr/DDBQ5F/o7S1WmPNbYMswgSztH0WEMEnF6zW0TfrQlRPZjRb5XbFX7jTknlqdMOiiCUg= X-Received: by 2002:ac2:5dd3:0:b0:51e:ef7f:4e89 with SMTP id x19-20020ac25dd3000000b0051eef7f4e89mr7594291lfq.6.1715063653718; Mon, 06 May 2024 23:34:13 -0700 (PDT) MIME-Version: 1.0 References: <20240506212701.4115576-1-quic_apinski@quicinc.com> In-Reply-To: <20240506212701.4115576-1-quic_apinski@quicinc.com> From: Richard Biener Date: Tue, 7 May 2024 08:34:02 +0200 Message-ID: Subject: Re: [PATCH] Mention that some options are turned on by `-Ofast` in their descriptions [PR97263] To: Andrew Pinski Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Mon, May 6, 2024 at 11:28=E2=80=AFPM Andrew Pinski wrote: > > Like was done for -ffast-math in r0-105946-ga570fc16fa8056, we should > document that -Ofast enables -fmath-errno, -funsafe-math-optimizations, > -finite-math-only, -fno-trapping-math in their documentation. > > Note this changes the stronger "must not" to be "is not" for -fno-trappin= g-math > since we do enable it for -Ofast already. > > OK? OK > gcc/ChangeLog: > > PR middle-end/97263 > * doc/invoke.texi(fmath-errno): Document it is turned on > with -Ofast. > (funsafe-math-optimizations): Likewise. > (ffinite-math-only): Likewise. > (fno-trapping-math): Likewise and use less strong language. > > Signed-off-by: Andrew Pinski > --- > gcc/doc/invoke.texi | 41 ++++++++++++++++++++++------------------- > 1 file changed, 22 insertions(+), 19 deletions(-) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 9456ced468a..14ff4d25da7 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -14996,11 +14996,12 @@ with a single instruction, e.g., @code{sqrt}. = A program that relies on > IEEE exceptions for math error handling may want to use this flag > for speed while maintaining IEEE arithmetic compatibility. > > -This option is not turned on by any @option{-O} option since > -it can result in incorrect output for programs that depend on > -an exact implementation of IEEE or ISO rules/specifications for > -math functions. It may, however, yield faster code for programs > -that do not require the guarantees of these specifications. > +This option is not turned on by any @option{-O} option besides > +@option{-Ofast} since it can result in incorrect output for > +programs that depend on an exact implementation of IEEE or > +ISO rules/specifications for math functions. It may, however, > +yield faster code for programs that do not require the guarantees > +of these specifications. > > The default is @option{-fmath-errno}. > > @@ -15017,11 +15018,12 @@ ANSI standards. When used at link time, it may= include libraries > or startup files that change the default FPU control word or other > similar optimizations. > > -This option is not turned on by any @option{-O} option since > -it can result in incorrect output for programs that depend on > -an exact implementation of IEEE or ISO rules/specifications for > -math functions. It may, however, yield faster code for programs > -that do not require the guarantees of these specifications. > +This option is not turned on by any @option{-O} option besides > +@option{-Ofast} since it can result in incorrect output > +for programs that depend on an exact implementation of IEEE > +or ISO rules/specifications for math functions. It may, however, > +yield faster code for programs that do not require the guarantees > +of these specifications. > Enables @option{-fno-signed-zeros}, @option{-fno-trapping-math}, > @option{-fassociative-math} and @option{-freciprocal-math}. > > @@ -15061,11 +15063,12 @@ The default is @option{-fno-reciprocal-math}. > Allow optimizations for floating-point arithmetic that assume > that arguments and results are not NaNs or +-Infs. > > -This option is not turned on by any @option{-O} option since > -it can result in incorrect output for programs that depend on > -an exact implementation of IEEE or ISO rules/specifications for > -math functions. It may, however, yield faster code for programs > -that do not require the guarantees of these specifications. > +This option is not turned on by any @option{-O} option besides > +@option{-Ofast} since it can result in incorrect output > +for programs that depend on an exact implementation of IEEE or > +ISO rules/specifications for math functions. It may, however, > +yield faster code for programs that do not require the guarantees > +of these specifications. > > The default is @option{-fno-finite-math-only}. > > @@ -15089,10 +15092,10 @@ underflow, inexact result and invalid operation= . This option requires > that @option{-fno-signaling-nans} be in effect. Setting this option may > allow faster code if one relies on ``non-stop'' IEEE arithmetic, for exa= mple. > > -This option should never be turned on by any @option{-O} option since > -it can result in incorrect output for programs that depend on > -an exact implementation of IEEE or ISO rules/specifications for > -math functions. > +This option is not turned on by any @option{-O} option besides > +@option{-Ofast} since it can result in incorrect output for programs > +that depend on an exact implementation of IEEE or ISO rules/specificatio= ns > +for math functions. > > The default is @option{-ftrapping-math}. > > -- > 2.43.0 >