[PATCH] D158081: [IR] Add writable attribute

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 11:04:54 PDT 2023


nikic added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1537
+    This attribute is only meaningful in conjunction with ``dereferenceable(N)``
+    or another attribute that implies the first ``N`` bytes of the pointer
+    argument are dereferenceable.
----------------
efriedma wrote:
> I think I'd suggest dropping the "or another attribute" part; it makes it harder to reason about the semantics on the caller side.
My motivation for this is to allow reusing standard dereferenceability APIs. Otherwise we would have to thread an extra option through APIs like isDereferenceablePointer() that restricts it to only dereferenceable and excludes the other attributes.


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

https://reviews.llvm.org/D158081



More information about the llvm-commits mailing list