[PATCH] D88325: IR: Reject unsized sret in verifier

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 07:41:36 PST 2022


arsenm added a comment.
Herald added a project: All.

In D88325#2301253 <https://reviews.llvm.org/D88325#2301253>, @rjmccall wrote:

> `sret` marks that a parameter needs the special indirect-return argument ABI, which does *not* require a sized type on many architectures.  Swift actually relies on being able to trigger this ABI on a value of unknown size.  Swift can, of course, just use a meaningless sized type, but since I assume you intend to actually use the type for something, I am concerned.

Well, I'm concerned this edge case apparently exists and has very little test coverage anywhere. It's the odd one out among the other type carrying attributes and I dislike the asymmetry with byval. Is there any real reason to use an unsized type over a 0 sized type here?


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

https://reviews.llvm.org/D88325



More information about the llvm-commits mailing list