[PATCH] D116532: [LangRef] Add noreadafterunwind attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 6 00:35:09 PST 2022


nikic updated this revision to Diff 397807.
nikic retitled this revision from "[LangRef] Add noreadonunwind attribute" to "[LangRef] Add noreadafterunwind attribute".
nikic edited the summary of this revision.
nikic added a comment.

Rename to `noreadafterunwind` to clarify the this only limits reads after the unwind, not that the call itself can't read if it will later unwind.


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

https://reviews.llvm.org/D116532

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1269,6 +1269,16 @@
     This indicates that callee does not free the pointer argument. This is not
     a valid attribute for return values.
 
+``noreadafterunwind``
+    This indicates that the underlying object of a pointer argument is not read
+    on the unwind path in the following sense: If a call with a
+    ``noreadafterunwind`` argument unwinds, then the underlying object
+    associated with the argument is overwritten with a :ref:`poison value
+    <poisonvalue>`. As such, reads from this object do not result in immediate
+    undefined behavior, but program behavior cannot depend on the object
+    containing any specific value.  This attribute cannot be applied to return
+    values.
+
 .. _nest:
 
 ``nest``


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116532.397807.patch
Type: text/x-patch
Size: 884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220106/45b87424/attachment.bin>


More information about the llvm-commits mailing list