On Sun, Jan 8, 2012 at 9:17 AM, Jon Harrop <jon at ffconsultancy.com>
wrote:> What is the current status of multiple return values in LLVM and are there
> any further plans?
>
> In particular, if a function returns a struct will it be handled (assuming
> fastcc) more efficiently than having the caller stack allocate space for it
> and pass that by reference to the callee to fill in?
The values will be returned in registers if they fit; we use this to
match ABIs which requires returning values in multiple registers. In
theory, we will fall back to an sret pointer if there are too many
values to fit in registers. In practice, the fallback-to-sret only
actually works on x86 at the moment, IIRC.
-Eli