From 05d670971e5de3b199b0bbdcd36c4062b8c0065e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Apr 2008 05:59:56 +0000 Subject: Doc updates/edits, contributed by Terence Parr! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50205 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/GarbageCollection.html | 30 +++++++++++++++--------------- docs/LangRef.html | 8 ++++---- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'docs') diff --git a/docs/GarbageCollection.html b/docs/GarbageCollection.html index 0e97f02..6086a08 100644 --- a/docs/GarbageCollection.html +++ b/docs/GarbageCollection.html @@ -151,7 +151,7 @@ support accurate garbage collection.

LLVM's intermediate representation provides garbage -collection intrinsics which offer support for a broad class of +collection intrinsics that offer support for a broad class of collector models. For instance, the intrinsics permit:

@@ -1366,7 +1366,7 @@ book-keeping is needed at all. This is common for Lisp-like languages.

The LLVM garbage collectors are capable of supporting all of these styles of language, including ones that mix various implementations. To do this, it allows the source-language to associate meta-data with the stack roots, and the heap tracing routines can propagate the +href="#gcroot">stack roots, and the heap tracing routines can propagate the information. In addition, LLVM allows the front-end to extract GC information in any form from a specific object pointer (this supports situations #1 and #3).

diff --git a/docs/LangRef.html b/docs/LangRef.html index 9679291..6591b27 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -3020,8 +3020,8 @@ provided depend on the type of the first pointer argument. The 'getelementptr' instruction is used to index down through the type levels of a structure or to a specific index in an array. When indexing into a structure, only i32 integer constants are allowed. When indexing -into an array or pointer, only integers of 32 or 64 bits are allowed, and will -be sign extended to 64-bit values.

+into an array or pointer, only integers of 32 or 64 bits are allowed; 32-bit +values will be sign extended to 64-bits if required.

For example, let's consider a C code fragment and how it gets compiled to LLVM:

@@ -3096,7 +3096,7 @@ the LLVM code for the given testcase is equivalent to:

Note that it is undefined to access an array out of bounds: array and pointer indexes must always be within the defined bounds of the array type. -The one exception for this rules is zero length arrays. These arrays are +The one exception for this rule is zero length arrays. These arrays are defined to be accessible as variable length arrays, which requires access beyond the zero'th element.

@@ -4207,7 +4207,7 @@ value address) contains the meta-data to be associated with the root.

Semantics:
-

At runtime, a call to this intrinsics stores a null pointer into the "ptrloc" +

At runtime, a call to this intrinsic stores a null pointer into the "ptrloc" location. At compile-time, the code generator generates information to allow the runtime to find the pointer at GC safe points. The 'llvm.gcroot' intrinsic may only be used in a function which specifies a GC -- cgit v1.1