Skip to content

Commit

Permalink
Ofast deprecation clarifications (llvm#101005)
Browse files Browse the repository at this point in the history
Following up on the RFC discussion, this is clarifying that the main
purpose and effect of the -Ofast deprecation is to discourage its usage
and that everything else is more or less open for discussion, e.g. there
is no timeline yet for removal.

---------

Co-authored-by: Aaron Ballman <[email protected]>
  • Loading branch information
sjoerdmeijer and AaronBallman authored Aug 2, 2024
1 parent 0fd980e commit 48d4d4b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clang/docs/CommandGuide/clang.rst
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,12 @@ Code Generation Options

:option:`-Ofast` Enables all the optimizations from :option:`-O3` along
with other aggressive optimizations that may violate strict compliance with
language standards. This is deprecated in favor of :option:`-O3`
in combination with :option:`-ffast-math`.
language standards. This is deprecated in Clang 19 and a warning is emitted
that :option:`-O3` in combination with :option:`-ffast-math` should be used
instead if the request for non-standard math behavior is intended. There
is no timeline yet for removal; the aim is to discourage use of
:option:`-Ofast` due to the surprising behavior of an optimization flag
changing the observable behavior of correct code.

:option:`-Os` Like :option:`-O2` with extra optimizations to reduce code
size.
Expand Down

0 comments on commit 48d4d4b

Please sign in to comment.