summaryrefslogtreecommitdiff
path: root/docs/LangRef.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/LangRef.html')
-rw-r--r--docs/LangRef.html24
1 files changed, 14 insertions, 10 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index cdf28078cce..b222b063194 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -8441,8 +8441,8 @@ LLVM</a>.</p>
<h5>Syntax:</h5>
<pre>
- declare i32 @llvm.objectsize.i32(i8* &lt;object&gt;, i1 &lt;type&gt;)
- declare i64 @llvm.objectsize.i64(i8* &lt;object&gt;, i1 &lt;type&gt;)
+ declare i32 @llvm.objectsize.i32(i8* &lt;object&gt;, i1 &lt;min&gt;, i32 &lt;runtime&gt;)
+ declare i64 @llvm.objectsize.i64(i8* &lt;object&gt;, i1 &lt;min&gt;, i32 &lt;runtime&gt;)
</pre>
<h5>Overview:</h5>
@@ -8453,17 +8453,21 @@ LLVM</a>.</p>
an allocation of a specific class, structure, array, or other object.</p>
<h5>Arguments:</h5>
-<p>The <tt>llvm.objectsize</tt> intrinsic takes two arguments. The first
+<p>The <tt>llvm.objectsize</tt> intrinsic takes three arguments. The first
argument is a pointer to or into the <tt>object</tt>. The second argument
- is a boolean 0 or 1. This argument determines whether you want the
- maximum (0) or minimum (1) bytes remaining. This needs to be a literal 0 or
- 1, variables are not allowed.</p>
+ is a boolean and determines whether <tt>llvm.objectsize</tt> returns 0 (if true)
+ or -1 (if false) when the object size is unknown.
+ The third argument, <tt>runtime</tt>, indicates whether the compiler is allowed
+ to return a non-constant value. The higher the value, the higher the potential
+ run-time performance impact.
+ The second and third arguments only accepts constants.</p>
<h5>Semantics:</h5>
-<p>The <tt>llvm.objectsize</tt> intrinsic is lowered to either a constant
- representing the size of the object concerned, or <tt>i32/i64 -1 or 0</tt>,
- depending on the <tt>type</tt> argument, if the size cannot be determined at
- compile time.</p>
+<p>The <tt>llvm.objectsize</tt> intrinsic is lowered to a constant representing
+ the size of the object concerned. If the size cannot be determined at compile
+ time, <tt>llvm.objectsize</tt> either returns <tt>i32/i64 -1 or 0</tt>
+ (depending on the <tt>min</tt> argument) if <tt>runtime</tt> is 0, or a run-time
+ value (if <tt>runtime</tt> &gt; 0 and an expression could be generated).</p>
</div>
<!-- _______________________________________________________________________ -->