diff options
author | Philip Reames <listmail@philipreames.com> | 2018-11-08 23:20:40 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2018-11-08 23:20:40 +0000 |
commit | 8c7b78767a20664d6df6daa77abef78a0e9580af (patch) | |
tree | efcb294a676722aa0246a35a6993d1b1c6a2e7eb | |
parent | e777f013ac4bd967d5435e19502bfd9adaa6fb5f (diff) | |
download | bcm5719-llvm-8c7b78767a20664d6df6daa77abef78a0e9580af.tar.gz bcm5719-llvm-8c7b78767a20664d6df6daa77abef78a0e9580af.zip |
[docs][statepoint] Document explicitly provided stack slots
Functionality for this was added a while ago, though never documented or extensively tested. Document it with an explicit warning.
llvm-svn: 346448
-rw-r--r-- | llvm/docs/Statepoints.rst | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/docs/Statepoints.rst b/llvm/docs/Statepoints.rst index aefdc7ff989..3b7687fef43 100644 --- a/llvm/docs/Statepoints.rst +++ b/llvm/docs/Statepoints.rst @@ -275,6 +275,34 @@ collector: ret i8 addrspace(1)* %obj } +Recording On Stack Regions +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In addition to the explicit relocation form previously described, the +statepoint infrastructure also allows the listing of allocas within the gc +pointer list. Allocas can be listed with or without additional explicit gc +pointer values and relocations. + +An alloca in the gc region of the statepoint operand list will cause the +address of the stack region to be listed in the stackmap for the statepoint. + +This mechanism can be used to describe explicit spill slots if desired. It +then becomes the generator's responsibility to ensure that values are +spill/filled to/from the alloca as needed on either side of the safepoint. +Note that there is no way to indicate a corresponding base pointer for such +an explicitly specified spill slot, so usage is restricted to values for +which the associated collector can derive the object base from the pointer +itself. + +This mechanism can be used to describe on stack objects containing +references provided that the collector can map from the location on the +stack to a heap map describing the internal layout of the references the +collector needs to process. + +WARNING: At the moment, this alternate form is not well exercised. It is +recommended to use this with caution and expect to have to fix a few bugs. +In particular, the RewriteStatepointsForGC utility pass does not do +anything for allocas today. Base & Derived Pointers ^^^^^^^^^^^^^^^^^^^^^^^ |