[PATCH] D123630: Remove connection between 'ffast-math' and 'ffp-contract'.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 08:45:52 PDT 2022


aaron.ballman added a reviewer: jcranmer-intel.
aaron.ballman added a comment.

I made some suggested documentation changes, but would love to hear more from folks heavily into floating-point options.



================
Comment at: clang/docs/UsersManual.rst:1409-1410
+   Disable fast-math mode.  This options disables unsafe floating-point
+   optimizations by preventing the compiler to make any tranformations that
+   could affect the results.
+
----------------



================
Comment at: clang/docs/UsersManual.rst:1432-1435
+   There is ambiguity about what value should ``ffp-contract`` has, when
+   options ``-ffp-contract``, ``-ffast-math`` and ``-fno-fast-math`` are
+   combined. To keep the value of ``ffp-contract`` consistent, we define this
+   set of rules:
----------------



================
Comment at: clang/docs/UsersManual.rst:1441-1443
+   * If ``-ffast-math`` and ``-ffp-contract`` are both seen, but
+     ``-fno-fast-math`` has not been seen after the last instance of
+     ``-ffast-math``, the ``ffp-contract`` will get the value of whichever option
----------------



================
Comment at: clang/docs/UsersManual.rst:1450-1452
+   * If ``-fno-fast-math`` is seen and ``-ffp-contract`` has not been seen, the
+     ``ffp-contract`` setting is determined by the default value of
+     ``ffp-contract``.
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123630/new/

https://reviews.llvm.org/D123630



More information about the cfe-commits mailing list