diff --git a/docs/GarbageCollection.html b/docs/GarbageCollection.html index a226b0ee3e1..9e888649e7d 100644 --- a/docs/GarbageCollection.html +++ b/docs/GarbageCollection.html @@ -1,4 +1,4 @@ - @@ -429,7 +429,8 @@ programs that use different garbage collection algorithms (or none at all).

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 compiler plugin.

+href="#plugin">compiler plugin. All calls to llvm.gcroot must reside + inside the first basic block.

A compiler which uses mem2reg to raise imperative code using alloca into SSA form need only add a call to @llvm.gcroot for those variables @@ -437,7 +438,9 @@ which a pointers into the GC heap.

It is also important to mark intermediate values with llvm.gcroot. For example, consider h(f(), g()). Beware leaking the result of -f() in the case that g() triggers a collection.

+f() in the case that g() triggers a collection. Note, that +stack variables must be initialized and marked with llvm.gcroot in +function's prologue.

The first argument must be a value referring to an alloca instruction or a bitcast of an alloca. The second contains a pointer to metadata that