[llvm-commits] ABI: how to let the backend know that an aggregate should be allocated on stack

Tim Northover t.p.northover at gmail.com
Wed Oct 24 13:03:12 PDT 2012


> That is a strange byval implementation. Maybe the llvm ARM backend
> should be changed to always pass byval on the stack? Clang can create
> regular (integer, fp) arguments for the registers.

The problem is that the ABI says the argument *should* be split
between registers and stack. The relevant callbacks in clang only get
to suggest one type (+ a padding dummy going before if they want);
they can't (currently) say "put the first 4 bytes here and the rest
there".

Given that constraint "byval" is probably the sanest option since it's
special anyway.

That could be changed of course, but I'm not convinced Clang would be
improved for it.

Tim.



More information about the llvm-commits mailing list