gcroot must take concrete types, not arbitrary types.
authorChris Lattner <sabre@nondot.org>
Fri, 21 Sep 2007 17:30:40 +0000 (17:30 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 21 Sep 2007 17:30:40 +0000 (17:30 +0000)
clean up intrinsic descriptions in langref a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42194 91177308-0d34-0410-b5e6-96231b3b80d8

docs/GarbageCollection.html
docs/LangRef.html
docs/index.html

index e39e85ce3cd22b09ae33641e74f9cee6a2531e23..df887f364fa9fbdfc53e2c4aecdd092211eba596 100644 (file)
@@ -159,7 +159,7 @@ interface that front-end authors should generate code for.
 <div class="doc_text">
 
 <div class="doc_code"><tt>
-  void %llvm.gcroot(&lt;ty&gt;** %ptrloc, &lt;ty2&gt;* %metadata)
+  void %llvm.gcroot(i8** %ptrloc, i8* %metadata)
 </tt></div>
 
 <p>
@@ -200,7 +200,8 @@ CodeBlock:
    ;; Initialize the object, telling LLVM that it is now live.
    ;; Java has type-tags on objects, so it doesn't need any
    ;; metadata.
-   call void %llvm.gcroot(%Object** %X, sbyte* null)
+   %tmp = bitcast %Object** %X to i8**
+   call void %llvm.gcroot(i8** %tmp, i8* null)
    ...
 
    ;; As the pointer goes out of scope, store a null value into
@@ -219,7 +220,7 @@ CodeBlock:
 <div class="doc_text">
 
 <div class="doc_code"><tt>
-  sbyte *%llvm_gc_allocate(unsigned %Size)
+  void *%llvm_gc_allocate(unsigned %Size)
 </tt></div>
 
 <p>The <tt>llvm_gc_allocate</tt> function is a global function defined by the
@@ -236,8 +237,8 @@ zeroed-out block of memory of the appropriate size.</p>
 <div class="doc_text">
 
 <div class="doc_code"><tt>
-  sbyte *%llvm.gcread(sbyte *, sbyte **)<br>
-  void %llvm.gcwrite(sbyte*, sbyte*, sbyte**)
+  i8 *%llvm.gcread(i8 *, i8 **)<br>
+  void %llvm.gcwrite(i8*, i8*, i8**)
 </tt></div>
 
 <p>Several of the more interesting garbage collectors (e.g., generational
index 76e7feed4bd3da593d58a1e99e1f0b7d08395696..1b3f4f4afe94b7cdc61cfa3a7df0e37f9866d585 100644 (file)
@@ -3923,7 +3923,7 @@ href="GarbageCollection.html">Accurate Garbage Collection with LLVM</a>.
 <h5>Syntax:</h5>
 
 <pre>
-  declare void @llvm.gcroot(&lt;ty&gt;** %ptrloc, &lt;ty2&gt;* %metadata)
+  declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata)
 </pre>
 
 <h5>Overview:</h5>
@@ -3957,7 +3957,7 @@ the runtime to find the pointer at GC safe points.
 <h5>Syntax:</h5>
 
 <pre>
-  declare i8 * @llvm.gcread(i8 * %ObjPtr, i8 ** %Ptr)
+  declare i8* @llvm.gcread(i8* %ObjPtr, i8** %Ptr)
 </pre>
 
 <h5>Overview:</h5>
@@ -3992,7 +3992,7 @@ garbage collector runtime, as needed.</p>
 <h5>Syntax:</h5>
 
 <pre>
-  declare void @llvm.gcwrite(i8 * %P1, i8 * %Obj, i8 ** %P2)
+  declare void @llvm.gcwrite(i8* %P1, i8* %Obj, i8** %P2)
 </pre>
 
 <h5>Overview:</h5>
@@ -4085,7 +4085,7 @@ source-language caller.
 
 <h5>Syntax:</h5>
 <pre>
-  declare i8  *@llvm.frameaddress(i32 &lt;level&gt;)
+  declare i8 *@llvm.frameaddress(i32 &lt;level&gt;)
 </pre>
 
 <h5>Overview:</h5>
@@ -4128,7 +4128,7 @@ source-language caller.
 
 <h5>Syntax:</h5>
 <pre>
-  declare i8  *@llvm.stacksave()
+  declare i8 *@llvm.stacksave()
 </pre>
 
 <h5>Overview:</h5>
@@ -4194,8 +4194,7 @@ See the description for <a href="#int_stacksave"><tt>llvm.stacksave</tt></a>.
 
 <h5>Syntax:</h5>
 <pre>
-  declare void @llvm.prefetch(i8  * &lt;address&gt;,
-                                i32 &lt;rw&gt;, i32 &lt;locality&gt;)
+  declare void @llvm.prefetch(i8* &lt;address&gt;, i32 &lt;rw&gt;, i32 &lt;locality&gt;)
 </pre>
 
 <h5>Overview:</h5>
@@ -4239,7 +4238,7 @@ performance.
 
 <h5>Syntax:</h5>
 <pre>
-  declare void @llvm.pcmarker( i32 &lt;id&gt; )
+  declare void @llvm.pcmarker(i32 &lt;id&gt;)
 </pre>
 
 <h5>Overview:</h5>
index 99aac4541b15a7fca570f6a754c39336b473872f..c343cf42652bf174e1e757e8548fb44135aa3a48 100644 (file)
@@ -271,3 +271,4 @@ times each day, making it a high volume list.</li>
   Last modified: $Date$
 </address>
 </body></html>
+