[PATCH] D127884: [LangRef] Document `elementtype` attribute requirement on atomic memory intrinsics.

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 11:08:02 PDT 2022


dantrushin created this revision.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
dantrushin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LLVM officially supports Garbage Collection environments, including those
requiring read and/or write barriers for object pointer loads/stores.
Such environments must be able to detect type of accessed object.
With opaque pointers the only possible way for memory intrinsics is
`elementtype` argument attribute. Document this requirement in description
of atomic memory intrinsics.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127884

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -24568,6 +24568,9 @@
 intrinsic, with the added constraint that ``len`` is required to be a positive integer
 multiple of the ``element_size``. If ``len`` is not a positive integer multiple of
 ``element_size``, then the behaviour of the intrinsic is undefined.
+If compiled for garbage collected environment which requires load/store barriers,
+``dest`` and ``src`` arguments should have ``elementtype`` attribute set. It
+must specify type of elements being copied.
 
 ``element_size`` must be a compile-time constant positive power of two no greater than
 target-specific atomic access size limit.
@@ -24644,6 +24647,9 @@
 ``len`` is required to be a positive integer multiple of the ``element_size``.
 If ``len`` is not a positive integer multiple of ``element_size``, then the
 behaviour of the intrinsic is undefined.
+If compiled for garbage collected environment which requires load/store barriers,
+``dest`` and ``src`` arguments should have ``elementtype`` attribute set. It
+must specify type of elements being moved.
 
 ``element_size`` must be a compile-time constant positive power of two no
 greater than a target-specific atomic access size limit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127884.437256.patch
Type: text/x-patch
Size: 1316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220615/0673584e/attachment.bin>


More information about the llvm-commits mailing list