From ecab34205a7fab4edb753e06ffcda5392b0dbba2 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi
/// @brief The map for a single function's stack frame. One of these is ++/// @brief The map for a single function's stack frame. One of these is /// compiled as constant data into the executable for each function. /// /// Storage of metadata values is elided if the %metadata parameter to @@ -338,7 +336,9 @@ void visitGCRoots(void (*Visitor)(void **Root, const void *Meta)) { for (unsigned e = R->Map->NumRoots; i != e; ++i) Visitor(&R->Roots[i], NULL); } -}
The gc function attribute is used to specify the desired GC style to the compiler. Its programmatic equivalent is the setGC method of Function.
@@ -420,12 +420,12 @@ programs that use different garbage collection algorithms (or none at all). Identifying GC roots on the stack: llvm.gcroot +The llvm.gcroot intrinsic is used to inform LLVM that a stack
variable references an object on the heap and is to be tracked for garbage
collection. The exact impact on generated code is specified by a
Consider the following fragment of Java code:
+
{
Object X; // A null-initialized reference to an object
...
@@ -463,7 +463,7 @@ the stack frame.
This block (which may be located in the middle of a function or in a loop nest), could be compiled to this LLVM code:
-+Entry: ;; In the entry block for the function, allocate the ;; stack space for X, which is an LLVM pointer. @@ -537,12 +537,12 @@ are used. Write barrier: llvm.gcwrite ++void @llvm.gcwrite(i8* %value, i8* %object, i8** %derived)--For write barriers, LLVM provides the llvm.gcwrite intrinsic function. It has exactly the same semantics as a non-volatile store to the derived pointer (the third argument). The exact code generated is specified @@ -559,12 +559,12 @@ implement reference counting.
Read barrier: llvm.gcread ++i8* @llvm.gcread(i8* %object, i8** %derived)-
-- + -For read barriers, LLVM provides the llvm.gcread intrinsic function. It has exactly the same semantics as a non-volatile load from the derived pointer (the second argument). The exact code generated is specified by diff --git a/docs/LangRef.html b/docs/LangRef.html index 583ef83f1c8..b20f085176e 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1576,11 +1576,11 @@ as if it writes to the relevant surrounding bytes.
+- +Atomic instructions (
cmpxchg
,atomicrmw
, @@ -4709,10 +4709,11 @@ that the invoke/unwind semantics are likely to change in future versions.+'fence' Instruction +
-+- +Syntax:
@@ -4763,10 +4764,11 @@ thread. (This is useful for interacting with signal handlers.)+'cmpxchg' Instruction +
-