[PATCH] D62319: IR: add 'size <N>' attribute to 'byval' function parameters
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 09:11:29 PDT 2019
dblaikie added a comment.
In D62319#1514029 <https://reviews.llvm.org/D62319#1514029>, @jyknight wrote:
> One of the other suggestions was to pass a _type_ as a parameter to byval. IMO that would be the nicest idea (but I don't know if it's infeasibly difficult?)
Yeah, sorry, forgot to mention that - one of the justifications for this was consistency with global variables (which, similarly, are really just bytes and alignment - but we use a type to describe those bytes and alignment)
> In the transitory state, you'd need to specify the exact pointee-type to byval, as is specified in the pointee type of the argument.
> E.g.:
>
> define i8 @f({i32, i8}* byval({i32, i8}) %p) ...
>
>
> In the future, that'd then turn into:
>
> define i8 @f(ptr byval({i32, i8}) %p) ...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62319/new/
https://reviews.llvm.org/D62319
More information about the llvm-commits
mailing list