[LLVMdev] Structs as first class values.

David Greene dag at cray.com
Wed Jul 23 15:31:21 PDT 2008


On Wednesday 23 July 2008 15:16, Chris Lattner wrote:
> On Jul 23, 2008, at 12:58 PM, Chris Lattner wrote:
> > Again, there is a many to one mapping from C type to LLVM type and
> > not all C types that map onto the same llvm type are supposed to be
> > handled the same way.
>
> One concrete example is that some ABIs say that _Complex double is
> returned differently than struct { double r,i; }.

Yes, that's a good point and something I had been missing.

I know that the divide between responsibilities of frontends and
backends is an endless debate.  I tend to side with those who
advocate for putting as much of the target-specific stuff into the
backend as possible.  That argument would lead me down the
road of advocating for attributes or some other mechanism to
tag types with source information so the backend could do what
needs to be done.

I'm not sure I want to get into that argument.  At lerast not right now.  :)
We're doing some things to fix this on our end.,  It would just be nice
if not everyone had to do the same thing over and over to accomplish
the same goal.

                                              -Dave



More information about the llvm-dev mailing list