summaryrefslogtreecommitdiff
path: root/docs/LangRef.html
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-05-09 15:52:43 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-05-09 15:52:43 +0000
commit30759542aa820b9fc74c77bfa3c011cb0a106ef9 (patch)
tree9698461a0cd7c16beea9446415a512f3e3bcde0e /docs/LangRef.html
parent80fa4723b9b7cb9d78d71648095e4e2804681402 (diff)
change the objectsize intrinsic signature: add a 3rd parameter to denote the maximum runtime performance penalty that the user is willing to accept.
This commit only adds the parameter. Code taking advantage of it will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156473 91177308-0d34-0410-b5e6-96231b3b80d8
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>
<!-- _______________________________________________________________________ -->