[PATCH] D62319: IR: add 'size <N>' attribute to 'byval' function parameters

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:34:08 PDT 2019


jyknight added a comment.

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?)

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