[PATCH] D79636: [LangRef] Clarify the semantics of the `byval` attribute

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 8 11:48:29 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1050
+    the call site argument and function argument are associated with the
+    original and copied memory respectively. The copy is considered to be local
+    memory of the callee. That means, a callee can wrtie a ``byval`` parameter
----------------
"Attributes on the call site argument and function argument are associated with the original and copied memory respectively"

This seems to fly in the face of existing practice, which is that function attributes are copied to each callsite.  I'd strongly prefer to keep the meaning of the attributes consistent, even if it leads to a weird result like writing to an argument marked "readonly".


================
Comment at: llvm/docs/LangRef.rst:1051
+    original and copied memory respectively. The copy is considered to be local
+    memory of the callee. That means, a callee can wrtie a ``byval`` parameter
+    and still be ``readonly`` or ``readnone`` because the write is, similar to
----------------
"wrtie "


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79636





More information about the cfe-commits mailing list