diff options
author | Duncan Sands <baldrick@free.fr> | 2012-04-16 16:28:59 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2012-04-16 16:28:59 +0000 |
commit | 8883c43ddc13e5f92ba8dfe00f2116a153a570d5 (patch) | |
tree | 40b5bad6be11275bb56cb7f227d1e4ee6544718d /docs | |
parent | 9e67db4af13abb967cae5858502207a43d26bf84 (diff) | |
download | llvm-8883c43ddc13e5f92ba8dfe00f2116a153a570d5.tar.gz llvm-8883c43ddc13e5f92ba8dfe00f2116a153a570d5.tar.bz2 llvm-8883c43ddc13e5f92ba8dfe00f2116a153a570d5.tar.xz |
Make it possible to indicate relaxed floating point requirements at the IR level
through the use of 'fpmath' metadata. Currently this only provides a 'fpaccuracy'
value, which may be a number in ULPs or the keyword 'fast', however the intent is
that this will be extended with additional information about NaN's, infinities
etc later. No optimizations have been hooked up to this so far.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/LangRef.html | 19 | ||||
-rw-r--r-- | docs/ReleaseNotes.html | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index c1482115a6..3a474a554d 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3006,10 +3006,12 @@ call void @llvm.dbg.value(metadata !24, i64 0, metadata !25) <div> <p><tt>fpmath</tt> metadata may be attached to any instruction of floating point - type. It can be used to express the maximum acceptable relative error in the - result of that instruction, in ULPs, thus potentially allowing the compiler - to use a more efficient but less accurate method of computing it. - ULP is defined as follows:</p> + type. It can be used to express the maximum acceptable error in the result of + that instruction, in ULPs, thus potentially allowing the compiler to use a + more efficient but less accurate method of computing it. The number of ULPs + may also be the string <tt>"fast"</tt>, which tells the compiler that speed + matters more than accuracy, so any fairly accurate method of computation is + fine as long as it is quick. ULP is defined as follows:</p> <blockquote> @@ -3021,13 +3023,14 @@ call void @llvm.dbg.value(metadata !24, i64 0, metadata !25) </blockquote> -<p>The metadata node shall consist of a single non-negative floating - point number representing the maximum relative error. For example, - 2.5 ULP:</p> +<p>The metadata node shall consist of a single positive floating point number + representing the maximum relative error, or the string <tt>"fast"</tt>. + For example:</p> <div class="doc_code"> <pre> -!0 = metadata !{ float 2.5 } +!0 = metadata !{ float 2.5 } ; maximum acceptable inaccuracy is 2.5 ULPs +!1 = metadata !{ !metadata !"fast" } ; potentially unbounded inaccuracy </pre> </div> diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index aa85e15f58..5af15ebe52 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -489,6 +489,9 @@ syntax, there are still significant gaps in that support.</p> <li>The <tt>unwind</tt> instruction is now gone. With the introduction of the new exception handling system in LLVM 3.0, the <tt>unwind</tt> instruction became obsolete.</li> + <li>Floating point instructions can be annotated with <tt>fpmath</tt> metadata + to indicate relaxed precision requirements, such as those corresponding to + "fast math".</li> <li>....</li> </ul> |