[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
Thu Oct 25 03:04:37 PDT 2012


Hi Duncan,

> I think it is best if "byval" acts in the same simple way everywhere: it
> passes the argument on the stack.  Front-ends can split types themselves
> into the bits that have to go into registers, and the bits that need to
> go on the stack.  That's how it's done for x86-64 for example.

I'd not seen that X86 code before. It looks like the type it suggests
is a single LLVM aggregate, so if it wanted one integer register and
one floating it might suggest a direct return result of "dircect:{i64,
double}", which then gets split up and allocated by LLVM.

I think that *could* work for ARM. All byval really gives you is the
alignment information, and that can be handled with padding for split
case.

Thanks, and sorry for my misleading comment yesterday!

Tim.



More information about the llvm-commits mailing list