[llvm-branch-commits] [clang] release/19.x: Ofast deprecation clarifications (#101005) (PR #101663)

Aaron Ballman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 2 07:01:13 PDT 2024


AaronBallman wrote:

The current release note reads as:
```
- The ``-Ofast`` command-line option has been deprecated. This option both
  enables the ``-O3`` optimization-level, as well as enabling non-standard
  ``-ffast-math`` behaviors. As such, it is somewhat misleading as an
  "optimization level". Users are advised to switch to ``-O3 -ffast-math`` if
  the use of non-standard math behavior is intended, and ``-O3`` otherwise.
  See `RFC <https://discourse.llvm.org/t/rfc-deprecate-ofast/78687>`_ for details.
```
and I think we'd like this to be changed to instead read:
```
- The ``-Ofast`` command-line option has been deprecated. This option both
  enables the ``-O3`` optimization-level, as well as enabling other
  options, including non-standard ``-ffast-math`` behaviors. As such, 
  it is somewhat misleading as an "optimization level". Users are
  advised to switch to ``-O3 -ffast-math -fstrict-aliasing``
  to retain the previous behavior, and ``-O3`` otherwise.
  **Note**: there is no firm date for removal of the option; its
  use is discouraged and the option may or may not be removed
  in the future. See
  `RFC <https://discourse.llvm.org/t/rfc-deprecate-ofast/78687>`_
  for details.
```
WDYT @sjoerdmeijer ?

https://github.com/llvm/llvm-project/pull/101663


More information about the llvm-branch-commits mailing list