[llvm-commits] [llvm] r168652 - /llvm/trunk/docs/LangRef.html
Michael Ilseman
milseman at apple.com
Fri Nov 30 14:21:18 PST 2012
Getting back around to this now; here's a patch to clean up the documentation. Thoughts?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-math-doc.patch
Type: application/octet-stream
Size: 9536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121130/9ed65aab/attachment.obj>
-------------- next part --------------
On Nov 26, 2012, at 7:11 PM, Michael Ilseman <milseman at apple.com> wrote:
> That's a good idea, I'll do that.
>
> On Nov 26, 2012, at 6:05 PM, Sean Silva <silvas at purdue.edu> wrote:
>
>> It seems needlessly repetitious end non-future-proof to copypaste the
>> description of the flags for each instruction. Why don't you split
>> them out into a section similar to how "Atomic Memory Ordering
>> Constraints" <http://llvm.org/docs/LangRef.html#ordering> has been
>> split out?
>>
>> -- Sean Silva
>>
>> On Mon, Nov 26, 2012 at 7:48 PM, Michael Ilseman <milseman at apple.com> wrote:
>>> Author: milseman
>>> Date: Mon Nov 26 18:48:29 2012
>>> New Revision: 168652
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=168652&view=rev
>>> Log:
>>> Fast-math flags documentation added to LangRef
>>>
>>>
>>> Modified:
>>> llvm/trunk/docs/LangRef.html
>>>
>>> Modified: llvm/trunk/docs/LangRef.html
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=168652&r1=168651&r2=168652&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/docs/LangRef.html (original)
>>> +++ llvm/trunk/docs/LangRef.html Mon Nov 26 18:48:29 2012
>>> @@ -3970,7 +3970,7 @@
>>>
>>> <h5>Syntax:</h5>
>>> <pre>
>>> - <result> = fadd <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> + <result> = fadd [fast-math flags]* <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> </pre>
>>>
>>> <h5>Overview:</h5>
>>> @@ -3982,7 +3982,28 @@
>>> floating point values. Both arguments must have identical types.</p>
>>>
>>> <h5>Semantics:</h5>
>>> -<p>The value produced is the floating point sum of the two operands.</p>
>>> +<p>The value produced is the floating point sum of the two operands. This
>>> + instruction can also take any number of fast-math flags, which are
>>> + optimization hints to enable otherwise unsafe floating point
>>> + optimizations:</p>
>>> +<ol>
>>> +
>>> + <li><tt>nnan</tt>: No NaNs - Allow optimizations to assume the arguments and
>>> + result are not NaN. Such optimizations are required to retain defined behavior
>>> + over NaNs, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>ninf</tt>: No Inf - Allow optimizations to assume the arguments and
>>> + result are not +/-Inf. Such optimizations are required to retain defined
>>> + behavior over +/-Inf, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>nsz</tt>: No Signed Zeros: Allow optimizations to treat the
>>> + sign of a zero argument or result as insignificant. </li>
>>> +
>>> + <li><tt>fast</tt>: Allow algebraically equivalent transformations that may
>>> + dramatically change results in floating point (e.g. reassociate). This flag
>>> + implies all the others.</li>
>>> +
>>> +</ol>
>>>
>>> <h5>Example:</h5>
>>> <pre>
>>> @@ -4052,7 +4073,7 @@
>>>
>>> <h5>Syntax:</h5>
>>> <pre>
>>> - <result> = fsub <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> + <result> = fsub [fast-math flags]* <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> </pre>
>>>
>>> <h5>Overview:</h5>
>>> @@ -4069,7 +4090,28 @@
>>> floating point values. Both arguments must have identical types.</p>
>>>
>>> <h5>Semantics:</h5>
>>> -<p>The value produced is the floating point difference of the two operands.</p>
>>> +<p>The value produced is the floating point difference of the two operands. This
>>> + instruction can also take any number of fast-math flags, which are
>>> + optimization hints to enable otherwise unsafe floating point
>>> + optimizations:</p>
>>> +<ol>
>>> +
>>> + <li><tt>nnan</tt>: No NaNs - Allow optimizations to assume the arguments and
>>> + result are not NaN. Such optimizations are required to retain defined behavior
>>> + over NaNs, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>ninf</tt>: No Inf - Allow optimizations to assume the arguments and
>>> + result are not +/-Inf. Such optimizations are required to retain defined
>>> + behavior over +/-Inf, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>nsz</tt>: No Signed Zeros: Allow optimizations to treat the
>>> + sign of a zero argument or result as insignificant. </li>
>>> +
>>> + <li><tt>fast</tt>: Allow algebraically equivalent transformations that may
>>> + dramatically change results in floating point (e.g. reassociate). This flag
>>> + implies all the others.</li>
>>> +
>>> +</ol>
>>>
>>> <h5>Example:</h5>
>>> <pre>
>>> @@ -4138,7 +4180,7 @@
>>>
>>> <h5>Syntax:</h5>
>>> <pre>
>>> - <result> = fmul <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> + <result> = fmul [fast-math flags]* <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> </pre>
>>>
>>> <h5>Overview:</h5>
>>> @@ -4150,7 +4192,28 @@
>>> floating point values. Both arguments must have identical types.</p>
>>>
>>> <h5>Semantics:</h5>
>>> -<p>The value produced is the floating point product of the two operands.</p>
>>> +<p>The value produced is the floating point product of the two operands. This
>>> + instruction can also take any number of fast-math flags, which are
>>> + optimization hints to enable otherwise unsafe floating point
>>> + optimizations:</p>
>>> +<ol>
>>> +
>>> + <li><tt>nnan</tt>: No NaNs - Allow optimizations to assume the arguments and
>>> + result are not NaN. Such optimizations are required to retain defined behavior
>>> + over NaNs, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>ninf</tt>: No Inf - Allow optimizations to assume the arguments and
>>> + result are not +/-Inf. Such optimizations are required to retain defined
>>> + behavior over +/-Inf, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>nsz</tt>: No Signed Zeros: Allow optimizations to treat the
>>> + sign of a zero argument or result as insignificant. </li>
>>> +
>>> + <li><tt>fast</tt>: Allow algebraically equivalent transformations that may
>>> + dramatically change results in floating point (e.g. reassociate). This flag
>>> + implies all the others.</li>
>>> +
>>> +</ol>
>>>
>>> <h5>Example:</h5>
>>> <pre>
>>> @@ -4252,7 +4315,7 @@
>>>
>>> <h5>Syntax:</h5>
>>> <pre>
>>> - <result> = fdiv <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> + <result> = fdiv [fast-math flags]* <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> </pre>
>>>
>>> <h5>Overview:</h5>
>>> @@ -4264,7 +4327,32 @@
>>> floating point values. Both arguments must have identical types.</p>
>>>
>>> <h5>Semantics:</h5>
>>> -<p>The value produced is the floating point quotient of the two operands.</p>
>>> +<p>The value produced is the floating point quotient of the two operands. This
>>> + instruction can also take any number of fast-math flags, which are
>>> + optimization hints to enable otherwise unsafe floating point
>>> + optimizations:</p>
>>> +<ol>
>>> +
>>> + <li><tt>nnan</tt>: No NaNs - Allow optimizations to assume the arguments and
>>> + result are not NaN. Such optimizations are required to retain defined behavior
>>> + over NaNs, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>ninf</tt>: No Inf - Allow optimizations to assume the arguments and
>>> + result are not +/-Inf. Such optimizations are required to retain defined
>>> + behavior over +/-Inf, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>nsz</tt>: No Signed Zeros: Allow optimizations to treat the
>>> + sign of a zero argument or result as insignificant. </li>
>>> +
>>> + <li><tt>arcp</tt>: Allow Reciprocal: Allow optimizations to use the reciprocal
>>> + of an argument rather than perform division. </li>
>>> +
>>> + <li><tt>fast</tt>: Allow algebraically equivalent transformations that may
>>> + dramatically change results in floating point (e.g. reassociate). This flag
>>> + implies all the others.</li>
>>> +
>>> +</ol>
>>> +</p>
>>>
>>> <h5>Example:</h5>
>>> <pre>
>>> @@ -4371,7 +4459,7 @@
>>>
>>> <h5>Syntax:</h5>
>>> <pre>
>>> - <result> = frem <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> + <result> = frem [fast-math flags]* <ty> <op1>, <op2> <i>; yields {ty}:result</i>
>>> </pre>
>>>
>>> <h5>Overview:</h5>
>>> @@ -4384,8 +4472,32 @@
>>> floating point values. Both arguments must have identical types.</p>
>>>
>>> <h5>Semantics:</h5>
>>> -<p>This instruction returns the <i>remainder</i> of a division. The remainder
>>> - has the same sign as the dividend.</p>
>>> + <p>This instruction returns the <i>remainder</i> of a division. The remainder
>>> + has the same sign as the dividend. This instruction can also take any number
>>> + of fast-math flags, which are optimization hints to enable otherwise unsafe
>>> + floating point optimizations:</p>
>>> +
>>> +<ol>
>>> +
>>> + <li><tt>nnan</tt>: No NaNs - Allow optimizations to assume the arguments and
>>> + result are not NaN. Such optimizations are required to retain defined behavior
>>> + over NaNs, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>ninf</tt>: No Inf - Allow optimizations to assume the arguments and
>>> + result are not +/-Inf. Such optimizations are required to retain defined
>>> + behavior over +/-Inf, but the value of the result is undefined.</li>
>>> +
>>> + <li><tt>nsz</tt>: No Signed Zeros: Allow optimizations to treat the
>>> + sign of a zero argument or result as insignificant. </li>
>>> +
>>> + <li><tt>arcp</tt>: Allow Reciprocal: Allow optimizations to use the reciprocal
>>> + of an argument rather than perform division. </li>
>>> +
>>> + <li><tt>fast</tt>: Allow algebraically equivalent transformations that may
>>> + dramatically change results in floating point (e.g. reassociate). This flag
>>> + implies all the others.</li>
>>> +
>>> +</ol>
>>>
>>> <h5>Example:</h5>
>>> <pre>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list