From 7a65f99c130db1886f7aa8ad842e961a17868572 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Wed, 26 Aug 2015 17:25:36 +0000 Subject: [PATCH] [docs][Statepoint] Add definitions for base and derived pointers This section will be expanded over the next few days. This is just some initial content. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246041 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/Statepoints.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/Statepoints.rst b/docs/Statepoints.rst index 731706256f5..6f1a5a4671d 100644 --- a/docs/Statepoints.rst +++ b/docs/Statepoints.rst @@ -206,6 +206,23 @@ This example was taken from the tests for the :ref:`RewriteStatepointsForGC` uti opt -rewrite-statepoints-for-gc test/Transforms/RewriteStatepointsForGC/basics.ll -S | llc -debug-only=stackmaps +Base & Derived Pointers +^^^^^^^^^^^^^^^^^^^^^^^ + +A base pointer is one which points to the base of an allocation (object). A +derived pointer is one which is offset from a base pointer by some amount. +When relocating objects, a garbage collector needs to be able to relocate each +derived pointer associated with an allocation to the same offset from the new +address. + +Derived pointers fall in to two categories: + * "Interior derived pointers" remain within the bounds of the allocation + they're associated with. As a result, the base object can be found at + runtime provided the bounds of allocations are known to the runtime system. + * "Exterior derived pointers" are outside the bounds of the associated object; + they may even fall within *another* allocations address range. As a result, + there is no way for a garbage collector to determine which allocation they + are associated with at runtime and compiler support is needed. GC Transitions ^^^^^^^^^^^^^^^^^^ -- 2.34.1