diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-05-13 20:11:31 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-05-13 20:11:31 +0000 |
commit | 3f0ca03e94fbff0635c90825cd4de9e683868b11 (patch) | |
tree | c39235a7bb055792f08ebbdc1214bd994fd5f95d /docs/Statepoints.rst | |
parent | 7569db4a8cfd0bf78c47ac1675583b0c7ae01bd3 (diff) | |
download | llvm-3f0ca03e94fbff0635c90825cd4de9e683868b11.tar.gz |
[PlaceSafepoints] New attributes for patchable statepoints.
Summary:
This patch teaches the PlaceSafepoints pass about two `CallSite`
function attributes:
* "statepoint-id": if the string value of this attribute can be parsed
as an integer, then it is propagated to the ID parameter of the
statepoint created.
* "statepoint-num-patch-bytes": if the string value of this attribute
can be parsed as an integer, then it is propagated to the `num patch
bytes` parameter of the statepoint created.
This change intentionally does not assert on a malformed value for these
attributes, given that they're not "official" attributes.
Reviewers: reames, pgavlin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9735
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Statepoints.rst')
-rw-r--r-- | docs/Statepoints.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/Statepoints.rst b/docs/Statepoints.rst index 1e7198a11e6..55bdbd8a640 100644 --- a/docs/Statepoints.rst +++ b/docs/Statepoints.rst @@ -677,6 +677,21 @@ of this function is inserted at each poll site desired. While calls or invokes inside this method are transformed to a ``gc.statepoints``, recursive poll insertion is not performed. +By default PlaceSafepoints passes in ``0xABCDEF00`` as the statepoint +ID and ``0`` as the number of patchable bytes to the newly constructed +``gc.statepoint``. These values can be configured on a per-callsite +basis using the attributes ``"statepoint-id"`` and +``"statepoint-num-patch-bytes"``. If a call site is marked with a +``"statepoint-id"`` function attribute and its value is a positive +integer (represented as a string), then that value is used as the ID +of the newly constructed ``gc.statepoint``. If a call site is marked +with a ``"statepoint-num-patch-bytes"`` function attribute and its +value is a positive integer, then that value is used as the 'num patch +bytes' parameter of the newly constructed ``gc.statepoint``. The +``"statepoint-id"`` and ``"statepoint-num-patch-bytes"`` attributes +are not propagated to the ``gc.statepoint`` call or invoke if they +could be successfully parsed. + If you are scheduling the RewriteStatepointsForGC pass late in the pass order, you should probably schedule this pass immediately before it. The exception would be if you need to preserve abstract frame information (e.g. for |