diff options
author | Philip Reames <listmail@philipreames.com> | 2018-11-08 23:07:04 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2018-11-08 23:07:04 +0000 |
commit | e777f013ac4bd967d5435e19502bfd9adaa6fb5f (patch) | |
tree | e344bdd233c8af7aecddc185ea4a43d420bd7137 | |
parent | 78b46457fba815930334f80d39f90e201fddc339 (diff) | |
download | bcm5719-llvm-e777f013ac4bd967d5435e19502bfd9adaa6fb5f.tar.gz bcm5719-llvm-e777f013ac4bd967d5435e19502bfd9adaa6fb5f.zip |
[docs][statepoints] add a section spelling out simplifications for non-relocating GCs
llvm-svn: 346447
-rw-r--r-- | llvm/docs/Statepoints.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/docs/Statepoints.rst b/llvm/docs/Statepoints.rst index 4f44259e889..aefdc7ff989 100644 --- a/llvm/docs/Statepoints.rst +++ b/llvm/docs/Statepoints.rst @@ -254,6 +254,28 @@ following command. opt -rewrite-statepoints-for-gc test/Transforms/RewriteStatepointsForGC/basics.ll -S | llc -debug-only=stackmaps +Simplifications for Non-Relocating GCs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some of the complexity in the previous example is unnecessary for a +non-relocating collector. While a non-relocating collector still needs the +information about which location contain live references, it doesn't need to +represent explicit relocations. As such, the previously described explicit +lowering can be simplified to remove all of the ``gc.relocate`` intrinsic +calls and leave uses in terms of the original reference value. + +Here's the explicit lowering for the previous example for a non-relocating +collector: + +.. code-block:: llvm + + define i8 addrspace(1)* @test1(i8 addrspace(1)* %obj) + gc "statepoint-example" { + call token (i64, i32, void ()*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @foo, i32 0, i32 0, i32 0, i32 0, i8 addrspace(1)* %obj) + ret i8 addrspace(1)* %obj + } + + Base & Derived Pointers ^^^^^^^^^^^^^^^^^^^^^^^ |