<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Ah, sorry-<o:p></o:p></p>
<p class="MsoNormal">It broke the sphinx build bot, and the author was home for the evening and is going to get to it during the day today.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_____replyseparator"></a><b>From:</b> Richard Smith <richard@metafoo.co.uk>
<br>
<b>Sent:</b> Tuesday, September 17, 2019 8:10 PM<br>
<b>To:</b> Keane, Erich <erich.keane@intel.com><br>
<b>Cc:</b> cfe-commits <cfe-commits@lists.llvm.org><br>
<b>Subject:</b> Re: r372185 - Revert "Create UsersManual section entitled 'Controlling Floating Point"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">On Tue, 17 Sep 2019, 15:25 Erich Keane via cfe-commits, <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Author: erichkeane<br>
Date: Tue Sep 17 14:27:07 2019<br>
New Revision: 372185<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=372185&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=372185&view=rev</a><br>
Log:<br>
Revert "Create UsersManual section entitled 'Controlling Floating Point"<o:p></o:p></p>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When reverting a change, please include a reason for the revert in your commit message.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">This reverts commit a08d5a4b0ebd44dc64f41049ed4e97a3c6d31498.<br>
<br>
Modified:<br>
cfe/trunk/docs/UsersManual.rst<br>
<br>
Modified: cfe/trunk/docs/UsersManual.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=372185&r1=372184&r2=372185&view=diff" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=372185&r1=372184&r2=372185&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/docs/UsersManual.rst (original)<br>
+++ cfe/trunk/docs/UsersManual.rst Tue Sep 17 14:27:07 2019<br>
@@ -1128,165 +1128,6 @@ number of cases where the compilation en<br>
and the precompiled header cannot be generated after headers have been<br>
installed.<br>
<br>
-.. _controlling-fp-behavior:<br>
-<br>
-Controlling Floating Point Behavior<br>
------------------------------------<br>
-<br>
-Clang provides a number of ways to control floating point behavior. The options<br>
-are listed below.<br>
-<br>
-.. option:: -ffast-math<br>
-<br>
- Enable fast-math mode. This option lets the<br>
- compiler make aggressive, potentially-lossy assumptions about<br>
- floating-point math. These include:<br>
-<br>
- * Floating-point math obeys regular algebraic rules for real numbers (e.g.<br>
- ``+`` and ``*`` are associative, ``x/y == x * (1/y)``, and<br>
- ``(a + b) * c == a * c + b * c``),<br>
- * Operands to floating-point operations are not equal to ``NaN`` and<br>
- ``Inf``, and<br>
- * ``+0`` and ``-0`` are interchangeable.<br>
-<br>
- ``-ffast-math`` also defines the ``__FAST_MATH__`` preprocessor<br>
- macro. Some math libraries recognize this macro and change their behavior.<br>
- With the exception of ``-ffp-contract=fast``, using any of the options<br>
- below to disable any of the individual optimizations in ``-ffast-math``<br>
- will cause ``__FAST_MATH__`` to no longer be set.<br>
-<br>
- This option implies:<br>
-<br>
- * ``-fno-honor-infinities``<br>
-<br>
- * ``-fno-honor-nans``<br>
-<br>
- * ``-fno-math-errno``<br>
-<br>
- * ``-ffinite-math``<br>
-<br>
- * ``-fassociative-math``<br>
-<br>
- * ``-freciprocal-math``<br>
-<br>
- * ``-fno-signed-zeros``<br>
-<br>
- * ``-fno-trapping-math``<br>
-<br>
- * ``-ffp-contract=fast``<br>
-<br>
-.. option:: -fdenormal-fp-math=<value><br>
-<br>
- Select which denormal numbers the code is permitted to require.<br>
-<br>
- Valid values are: <br>
-<br>
- * ``ieee`` - IEEE 754 denormal numbers<br>
- * ``preserve-sign`` - the sign of a flushed-to-zero number is preserved in the sign of 0<br>
- * ``positive-zero`` - denormals are flushed to positive zero<br>
-<br>
- Defaults to ``ieee``.<br>
-<br>
-.. option:: -f[no-]strict-float-cast-overflow<br>
-<br>
- When a floating-point value is not representable in a destination integer <br>
- type, the code has undefined behavior according to the language standard.<br>
- By default, Clang will not guarantee any particular result in that case.<br>
- With the 'no-strict' option, Clang attempts to match the overflowing behavior<br>
- of the target's native float-to-int conversion instructions.<br>
-<br>
-.. option:: -f[no-]math-errno<br>
-<br>
- Require math functions to indicate errors by setting errno.<br>
- The default varies by ToolChain. ``-fno-math-errno`` allows optimizations<br>
- that might cause standard C math functions to not set ``errno``.<br>
- For example, on some systems, the math function ``sqrt`` is specified<br>
- as setting ``errno`` to ``EDOM`` when the input is negative. On these<br>
- systems, the compiler cannot normally optimize a call to ``sqrt`` to use<br>
- inline code (e.g. the x86 ``sqrtsd`` instruction) without additional<br>
- checking to ensure that ``errno`` is set appropriately.<br>
- ``-fno-math-errno`` permits these transformations.<br>
-<br>
- On some targets, math library functions never set ``errno``, and so<br>
- ``-fno-math-errno`` is the default. This includes most BSD-derived<br>
- systems, including Darwin.<br>
-<br>
-.. option:: -f[no-]trapping-math<br>
-<br>
- ``-fno-trapping-math`` allows optimizations that assume that<br>
- floating point operations cannot generate traps such as divide-by-zero,<br>
- overflow and underflow. Defaults to ``-ftrapping-math``.<br>
- Currently this option has no effect.<br>
-<br>
-.. option:: -ffp-contract=<value><br>
-<br>
- Specify when the compiler is permitted to form fused floating-point<br>
- operations, such as fused multiply-add (FMA). Fused operations are<br>
- permitted to produce more precise results than performing the same<br>
- operations separately.<br>
-<br>
- The C standard permits intermediate floating-point results within an<br>
- expression to be computed with more precision than their type would<br>
- normally allow. This permits operation fusing, and Clang takes advantage<br>
- of this by default. This behavior can be controlled with the<br>
- ``FP_CONTRACT`` pragma. Please refer to the pragma documentation for a<br>
- description of how the pragma interacts with this option.<br>
-<br>
- Valid values are:<br>
-<br>
- * ``fast`` (everywhere)<br>
- * ``on`` (according to FP_CONTRACT pragma, default)<br>
- * ``off`` (never fuse)<br>
-<br>
-.. option:: -f[no-]honor-infinities<br>
-<br>
- If both ``-fno-honor-infinities`` and ``-fno-honor-nans`` are used,<br>
- has the same effect as specifying ``-ffinite-math``.<br>
-<br>
-.. option:: -f[no-]honor-nans<br>
-<br>
- If both ``-fno-honor-infinities`` and ``-fno-honor-nans`` are used,<br>
- has the same effect as specifying ``-ffinite-math``.<br>
-<br>
-.. option:: -f[no-]signed-zeros<br>
-<br>
- Allow optimizations that ignore the sign of floating point zeros.<br>
- Defaults to ``-fno-signed-zeros``.<br>
-<br>
-.. option:: -f[no-]associative-math<br>
-<br>
- Allow floating point operations to be reassociated.<br>
- Defaults to ``-fno-associative-math``.<br>
-<br>
-.. option:: -f[no-]reciprocal-math<br>
-<br>
- Allow division operations to be transformed into multiplication by a<br>
- reciprocal. This can be significantly faster than an ordinary division<br>
- but can also have significantly less precision. Defaults to<br>
- ``-fno-reciprocal-math``.<br>
-<br>
-.. option:: -f[no-]unsafe-math-optimizations<br>
-<br>
- Allow unsafe floating-point optimizations. Also implies:<br>
-<br>
- * ``-fassociative-math``<br>
- * ``-freciprocal-math``<br>
- * ``-fno-signed-zeroes``<br>
- * ``-fno-trapping-math``.<br>
-<br>
- Defaults to ``-fno-unsafe-math-optimizations``.<br>
-<br>
-.. option:: -f[no-]finite-math<br>
-<br>
- Allow floating-point optimizations that assume arguments and results are<br>
- not NaNs or +-Inf. This defines the ``__FINITE_MATH_ONLY__`` preprocessor macro.<br>
- Also implies:<br>
-<br>
- * ``-fno-honor-infinities``<br>
- * ``-fno-honor-nans``<br>
-<br>
- Defaults to ``-fno-finite-math``.<br>
-<br>
.. _controlling-code-generation:<br>
<br>
Controlling Code Generation<br>
@@ -1425,6 +1266,36 @@ are listed below.<br>
This enables better devirtualization. Turned off by default, because it is<br>
still experimental.<br>
<br>
+.. option:: -ffast-math<br>
+<br>
+ Enable fast-math mode. This defines the ``__FAST_MATH__`` preprocessor<br>
+ macro, and lets the compiler make aggressive, potentially-lossy assumptions<br>
+ about floating-point math. These include:<br>
+<br>
+ * Floating-point math obeys regular algebraic rules for real numbers (e.g.<br>
+ ``+`` and ``*`` are associative, ``x/y == x * (1/y)``, and<br>
+ ``(a + b) * c == a * c + b * c``),<br>
+ * operands to floating-point operations are not equal to ``NaN`` and<br>
+ ``Inf``, and<br>
+ * ``+0`` and ``-0`` are interchangeable.<br>
+<br>
+.. option:: -fdenormal-fp-math=[values]<br>
+<br>
+ Select which denormal numbers the code is permitted to require.<br>
+<br>
+ Valid values are: ``ieee``, ``preserve-sign``, and ``positive-zero``,<br>
+ which correspond to IEEE 754 denormal numbers, the sign of a<br>
+ flushed-to-zero number is preserved in the sign of 0, denormals are<br>
+ flushed to positive zero, respectively.<br>
+<br>
+.. option:: -f[no-]strict-float-cast-overflow<br>
+<br>
+ When a floating-point value is not representable in a destination integer <br>
+ type, the code has undefined behavior according to the language standard.<br>
+ By default, Clang will not guarantee any particular result in that case.<br>
+ With the 'no-strict' option, Clang attempts to match the overflowing behavior<br>
+ of the target's native float-to-int conversion instructions.<br>
+<br>
.. option:: -fwhole-program-vtables<br>
<br>
Enable whole-program vtable optimizations, such as single-implementation<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>