[LLVMdev] Pass and return of large objects

Reid Kleckner
Tue, 02 Mar 2010 02:24:10 -0000

On Mon, Mar 1, 2010 at 8:34 PM, Russell Wallace
<russell.wallace at gmail.com> wrote:
>> It'd be nice to move some
>> of that logic back into LLVM, but it's tricky because C99 says
things
>> about complex numbers which requires special frontend type knowledge
>> that LLVM doesn't have.
>
> I hadn't realized that, I would've expected complex numbers to be
> doable as just a pair of scalar values. What's the fly in the ointment
> with C99 complex numbers?

I don't really know, I've just remember that it's been brought out
before as one of the difficulties of fully supporting passing and
returning large structs by value.  Hopefully someone more
knowledgeable can answer this question?

>> I'm just echoing previous discussion, and you can probably get a
more
>> reliable answer by finding the original discussion in the archives.
>
> I don't suppose you've any idea what search keywords might work?

I searched "sret" which found most of the discussion.  Kenneth
Uildricks wrote the support for lowering large struct returns on x86
to a hidden sret parameter in accordance with the x86 ABI, but no one
has stepped forward to add support for other targets.

Reid