From: Philip Reames Date: Wed, 25 Feb 2015 23:45:20 +0000 (+0000) Subject: [GC Docs] Update LangRef to link to Statepoint docs X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64025c5deaa136ea8a431a1be446427129278a38;p=oota-llvm.git [GC Docs] Update LangRef to link to Statepoint docs Add a brief section linking to the experimental statepoint intrinsics analogous to the one we have linking to patchpoint. While I'm here, cleanup some wording about what the gc "name" attribute actually means. It's not the name of a *collector* it's the name of the *strategy* which may be compatible with multiple collectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230576 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/GarbageCollection.rst b/docs/GarbageCollection.rst index 5d1588a7fe4..a1557fcdb09 100644 --- a/docs/GarbageCollection.rst +++ b/docs/GarbageCollection.rst @@ -386,6 +386,8 @@ greater performance impact since pointer reads are more frequent than writes. .. _plugin: +.. _builtin-gc-strategies: + Built In GC Strategies ====================== diff --git a/docs/LangRef.rst b/docs/LangRef.rst index 6b72e74d54d..6706552be86 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -1014,19 +1014,22 @@ Currently, only the following parameter attributes are defined: .. _gc: -Garbage Collector Names ------------------------ +Garbage Collector Strategy Names +-------------------------------- -Each function may specify a garbage collector name, which is simply a +Each function may specify a garbage collector strategy name, which is simply a string: .. code-block:: llvm define void @f() gc "name" { ... } -The compiler declares the supported values of *name*. Specifying a -collector will cause the compiler to alter its output in order to -support the named garbage collection algorithm. +The supported values of *name* includes those :ref:`built in to LLVM +` and any provided by loaded plugins. Specifying a GC +strategy will cause the compiler to alter its output in order to support the +named garbage collection algorithm. Note that LLVM itself does not contain a +garbage collector, this functionality is restricted to generating machine code +which can interoperate with a collector provided externally. .. _prefixdata: @@ -7113,11 +7116,18 @@ stack `, as well as garbage collector implementations that require :ref:`read ` and :ref:`write ` barriers. Front-ends for type-safe garbage collected languages should generate these intrinsics to make use of the LLVM garbage collectors. For more -details, see `Accurate Garbage Collection with -LLVM `_. +details, see `Garbage Collection with LLVM `_. + +Experimental Statepoint Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The garbage collection intrinsics only operate on objects in the generic -address space (address space zero). +LLVM provides an second experimental set of intrinsics for describing garbage +collection safepoints in compiled code. These intrinsics are an alternative +to the ``llvm.gcroot`` intrinsics, but are compatible with the ones for +:ref:`read ` and :ref:`write ` barriers. The +differences in approach are covered in the `Garbage Collection with LLVM +`_ documentation. The intrinsics themselves are +described in :doc:`Statepoints`. .. _int_gcroot: