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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 11 13:29:04 PDT 2020


efriedma added a comment.

Sure, I'm happy with the second option.

> Alignment at the call site might be higher than of the copy, breaking with the idea that the call site and callee "properties" match. Though, the attributes can probably be kept in sync if we teach the relevant parts.

The meaning of the "align" attribute with byval is weird from any perspective: it specifies both the alignment of the allocation, and the required alignment of the input.  It would be nice to separate those at some point.  (That would probably mean something like `byval(<ty>, <align>)` to specify the alignment of the copied memory, and then the `align` attribute would just specify the alignment of the input, like it does for other calls.)


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