[PATCH] D117571: [LangRef] Clarify that inaccessiblememonly functions are allowed noalias returns

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 14:48:04 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG17beee44e19b: [LangRef] Clarify that inaccessiblememonly functions are allowed noalias returns (authored by reames).

Changed prior to commit:
  https://reviews.llvm.org/D117571?vs=400869&id=401002#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117571

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1633,9 +1633,15 @@
     on all the hot functions.
 ``inaccessiblememonly``
     This attribute indicates that the function may only access memory that
-    is not accessible by the module being compiled. This is a weaker form
-    of ``readnone``. If the function reads or writes other memory, the
-    behavior is undefined.
+    is not accessible by the module being compiled before return from the
+    function. This is a weaker form of ``readnone``. If the function reads
+    or writes other memory, the behavior is undefined.
+
+    For clarity, note that such functions are allowed to return new memory
+    which is ``noalias`` with respect to memory already accessible from
+    the module.  That is, a function can be both ``inaccessiblememonly`` and
+    have a ``noalias`` return which introduces a new, potentially initialized,
+    allocation.
 ``inaccessiblemem_or_argmemonly``
     This attribute indicates that the function may only access memory that is
     either not accessible by the module being compiled, or is pointed to


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117571.401002.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/30312839/attachment.bin>


More information about the llvm-commits mailing list