[LLVMdev] Pass and return of large objects

Reid Kleckner rnk at mit.edu
Mon Mar 1 11:39:15 PST 2010


On Mon, Mar 1, 2010 at 10:58 AM, Russell Wallace
<russell.wallace at gmail.com> wrote:
> How do LLVM-GCC and Clang handle it?

IIRC they lower it themselves, doing whatever the ABI says they
should, which is usually adding a hidden sret parameter to the
function once you get beyond small structs.  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'm just echoing previous discussion, and you can probably get a more
reliable answer by finding the original discussion in the archives.

Reid



More information about the llvm-dev mailing list