diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-05-06 14:14:41 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-05-07 00:45:38 -0700 |
commit | 0920e64ffa55adb063174559b274b0a521f34934 (patch) | |
tree | 413367fff358fdd7a5ed029180bb97eee1bb4133 | |
parent | 8b974f54393ab2d2d16a0051a68c155455a92aad (diff) | |
download | gcc-0920e64ffa55adb063174559b274b0a521f34934.zip gcc-0920e64ffa55adb063174559b274b0a521f34934.tar.gz gcc-0920e64ffa55adb063174559b274b0a521f34934.tar.bz2 |
Mention that some options are turned on by `-Ofast` in their descriptions [PR97263]
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-trapping-math
since we do enable it for -Ofast already.
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 <quic_apinski@quicinc.com>
-rw-r--r-- | gcc/doc/invoke.texi | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dc4c5a3..ed03a61 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 example. -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/specifications +for math functions. The default is @option{-ftrapping-math}. |