From 32bece890ddbed87a52b3b6e72b2a6b186df0fd3 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Wed, 25 Feb 2015 23:45:20 +0000 Subject: [PATCH] [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. llvm-svn: 230576 --- docs/GarbageCollection.rst | 2 ++ docs/LangRef.rst | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) 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 `_. -The garbage collection intrinsics only operate on objects in the generic -address space (address space zero). +Experimental Statepoint Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +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: