[PATCH] D79636: [LangRef] Clarify the semantics of the `byval` attribute
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 9 10:05:17 PDT 2020
jdoerfert added a comment.
> "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".
First, this doesn't break with the practice that argument attributes are copied/applied to each call site, `byval` is still present at both the call site argument and the argument. It does state however that the pointer of the attribute is pointing to something different for the call site argument and for the argument. That is no different to the current semantic, as far as I can tell, just spelled out. Do you object to say that the call site argument and the argument point to distinct memory locations or something else?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79636/new/
https://reviews.llvm.org/D79636
More information about the llvm-commits
mailing list