[PATCH] D67517: Create UsersManual section entitled 'Controlling Floating Point Behavior'
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 12:51:29 PDT 2019
rjmccall added inline comments.
================
Comment at: clang/docs/UsersManual.rst:1152
+
+ This option implies:
+
----------------
cameron.mcinally wrote:
> mibintc wrote:
> > rjmccall wrote:
> > > To be clear, fast math is not *equivalent* to just setting all of these separately, right?
> > I think in fact ffast-math is the same as selecting all the invidivdual settings, part of the logic checks if all the features are enabled and then also sets the fast-math macro.
> Just checked for crtfastmath.o on the link line and they do not seem to be "equivalent", unless I made a mistake.
>
> That said, I think the language "implies" is acceptable here.
Even if the only difference was the macro, that would be quite important — the macros can result in substantially different behavior from math libraries, IIRC. So I would appreciate a wording that carries less of a connotation that this is equivalent to this fixed set of other options. Maybe "Some of the individual optimizations performed by fast-math can be separately enabled or disabled with the following options:"?
Melanie, are you saying that `__FAST_MATH__` is defined only if *all* of these options are set? I think that's important to cover as well; perhaps:
"``-ffast-math`` causes the macro ``__FAST_MATH__`` to be defined. Some math libraries recognize this macro and change their behavior. Using any of the options below to disable any of the individual optimizations in ``-ffast-math`` will cause ``__FAST_MATH__`` to no longer be set."
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67517/new/
https://reviews.llvm.org/D67517
More information about the llvm-commits
mailing list