@@ -4480,7 +4480,7 @@ the type size is smaller than the type's store size.
4480
4480
< vscale x <# elements> x <elementtype> > ; Scalable vector
4481
4481
4482
4482
The number of elements is a constant integer value larger than 0;
4483
- elementtype may be any integer, floating-point, pointer type, or a sized
4483
+ elementtype may be any integer, floating-point, pointer type, or a sized
4484
4484
target extension type that has the ``CanBeVectorElement`` property. Vectors
4485
4485
of size zero are not allowed. For scalable vectors, the total number of
4486
4486
elements is a constant multiple (called vscale) of the specified number
@@ -8351,6 +8351,37 @@ spaces. The interpretation of the address space values is target specific.
8351
8351
The behavior is undefined if the runtime memory address does
8352
8352
resolve to an object defined in one of the indicated address spaces.
8353
8353
8354
+ '``mmra``' Metadata
8355
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8356
+
8357
+ The ``mmra`` metadata represents target-defined properties on instructions that
8358
+ can be used to selectively relax constraints placed by the memory model.
8359
+
8360
+ Refer to :doc:`MemoryModelRelaxationAnnotations` for more information on how this metadata
8361
+ affects the memory model of a given target.
8362
+
8363
+ It is attached to memory instructions such as:
8364
+ :ref:`atomicrmw <i_atomicrmw>`, :ref:`cmpxchg <i_cmpxchg>`, :ref:`load <i_load>`,
8365
+ :ref:`store <i_store>`, :ref:`fence <i_fence>` and
8366
+ :ref:`call <i_call>` instructions that read or write memory.
8367
+
8368
+ The metadata is structured as pairs of strings: a prefix, and suffix that form a MMRA "tag".
8369
+ The ``!mmra`` operand can either point to a pair of metadata strings, or a tuple containing
8370
+ multiple pairs of metadata strings.
8371
+
8372
+ Example:
8373
+
8374
+ .. code-block:: llvm
8375
+
8376
+ ; Simple pair of strings used directly:
8377
+ %rmw.valid = atomicrmw and ptr %ptr, i64 %value seq_cst, !mmra !0
8378
+
8379
+ ; Using multiple pairs of strings using a metadata tuple:
8380
+ %rmw.valid = atomicrmw and ptr %ptr, i64 %value seq_cst, !mmra !2
8381
+
8382
+ !0 = !{!"amdgpu-synchronize-as", !"global"}
8383
+ !1 = !{!"amdgpu-synchronize-as", !"private"}
8384
+ !2 = !{!0, !1}
8354
8385
8355
8386
Module Flags Metadata
8356
8387
=====================
0 commit comments