[flang][docs] Update the -Ofast description in FlangDriver.md (#180138)

After #170505, `-fno-protect-parens` is now required for flang to behave
the same as `-Ofast`. This patch adds that information to the
description of `-Ofast` in `FlangDriver.md`.
This commit is contained in:
Shunsuke Watanabe 2026-02-12 08:50:03 +09:00 committed by GitHub
parent 79640967dd
commit dc2fc9e10b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -849,7 +849,7 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>,
def Ofast : Joined<["-"], "Ofast">, Group<O_Group>,
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
HelpTextForVariants<[FlangOption, FC1Option],
"Deprecated; use '-O3 -ffast-math -fstack-arrays' for the same behavior,"
"Deprecated; use '-O3 -ffast-math -fstack-arrays -fno-protect-parens' for the same behavior,"
" or '-O3 -fstack-arrays' to enable only conforming optimizations">,
HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior,"
" or '-O3' to enable only conforming optimizations">;

View File

@ -559,7 +559,7 @@ See the
documentation for more details.
## Ofast and Fast Math
`-Ofast` in Flang means `-O3 -ffast-math -fstack-arrays`.
`-Ofast` in Flang means `-O3 -ffast-math -fstack-arrays -fno-protect-parens`.
`-ffast-math` means the following:
- `-fno-honor-infinities`