[PATCH] D135597: [LangRef] Add memory attribute

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 02:18:44 PDT 2022


nhaehnle added a comment.

I'm pretty happy with the proposed spelling.



================
Comment at: llvm/docs/LangRef.rst:1733-1735
+``memory(...)``
+    This attribute specifies the possible memory effects of the call/function.
+    It allows specifying the possible access kinds (``none``, ``read``,
----------------
Since this is a new kind of "composite" attribute, it should be clearly stated:

* What the memory effects are if the attribute is missing entirely (presumably: all memory effects are possible, unless one of the legacy attributes is present)
* How attributes compose if you have one on the call instruction *and* on the callee (presumably: the possible memory effects are the *intersection* of memory effects given by the different attributes)


================
Comment at: llvm/docs/LangRef.rst:1748
+    - ``memory(read, argmem: readwrite)``: May read any memory (default mode)
+      and additional write argument memory.
+    - ``memory(readwrite, argmem: none)``: May access any memory apart from
----------------
*additionally


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135597/new/

https://reviews.llvm.org/D135597



More information about the llvm-commits mailing list