[PATCH] D124124: [LangRef] Limit read/writeonly attrs to memory visible to caller
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 14:09:45 PDT 2022
fhahn updated this revision to Diff 424022.
fhahn added a comment.
Use `caller functions` for the last paragraphs of both writeonly and readonly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124124/new/
https://reviews.llvm.org/D124124
Files:
llvm/docs/LangRef.rst
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1901,7 +1901,7 @@
through this pointer argument, even though it may write to the memory that
the pointer points to.
- If a readonly function writes memory visible to the program, or
+ If a readonly function writes memory visible to a caller function, or
has other side-effects, the behavior is undefined. If a function writes to
a readonly pointer argument, the behavior is undefined.
``"stack-probe-size"``
@@ -1923,13 +1923,13 @@
This attribute disables ABI-required stack probes, if any.
``writeonly``
On a function, this attribute indicates that the function may write to but
- does not read from memory.
+ does not read from memory visible to caller functions.
On an argument, this attribute indicates that the function may write to but
does not read through this pointer argument (even though it may read from
the memory that the pointer points to).
- If a writeonly function reads memory visible to the program, or
+ If a writeonly function reads memory visible to caller functions, or
has other side-effects, the behavior is undefined. If a function reads
from a writeonly pointer argument, the behavior is undefined.
``argmemonly``
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124124.424022.patch
Type: text/x-patch
Size: 1376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220420/19d3aa2a/attachment.bin>
More information about the llvm-commits
mailing list