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

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:30:46 PDT 2019


t.p.northover added a comment.

> ie: What about adding an integer parameter to 'byval'?

I do agree that we should prioritize the final state, but I think that final state should somehow include the word "size" so that the number is interpretable without looking at the documentation (at least to some degree). I also quite like the symmetry in this scheme between "size" and "align". Both of those are reasonably mild opinions though.

I have even less strong views on other components, though I'm not sure if you were even talking about those. We could, for example, change ATTR_KIND_SIZE to ATTR_KIND_BYVAL_WITH_SIZE and in the C++ representation drop the separate Attribute::Byval.

OTOH we could do both of those (and change IR, come to that) at some later date without breaking compatibility.


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

https://reviews.llvm.org/D62319





More information about the llvm-commits mailing list