mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Add a pinned metadata name for fpaccuracy, and document it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
<li><a href="#metadata">Metadata Nodes and Metadata Strings</a>
|
||||
<ol>
|
||||
<li><a href="#tbaa">'<tt>tbaa</tt>' Metadata</a></li>
|
||||
<li><a href="#fpaccuracy">'<tt>fpaccuracy</tt>' Metadata</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -2966,6 +2967,35 @@ call void @llvm.dbg.value(metadata !24, i64 0, metadata !25)
|
||||
|
||||
</div>
|
||||
|
||||
<h4>
|
||||
<a name="fpaccuracy">'<tt>fpaccuracy</tt>' Metadata</a>
|
||||
</h4>
|
||||
|
||||
<div>
|
||||
|
||||
<p><tt>fpaccuracy</tt> metadata may be attached to any instruction of floating
|
||||
point type. It expresses the maximum relative error of the result of
|
||||
that instruction, in ULPs. ULP is defined as follows:</p>
|
||||
|
||||
<blockquote><p>
|
||||
If x is a real number that lies between two finite consecutive floating-point
|
||||
numbers a and b, without being equal to one of them, then ulp(x) = |b - a|,
|
||||
otherwise ulp(x) is the distance between the two non-equal finite
|
||||
floating-point numbers nearest x. Moreover, ulp(NaN) is NaN.
|
||||
</p></blockquote>
|
||||
|
||||
<p>The maximum relative error may be any rational number. The metadata node
|
||||
shall consist of a pair of unsigned integers respectively representing
|
||||
the numerator and denominator. For example, 2.5 ULP:</p>
|
||||
|
||||
<div class="doc_code">
|
||||
<pre>
|
||||
!0 = metadata !{ i32 5, i32 2 }
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user