[LLVMdev] Pass and return of large objects
Duncan Sands
baldrick at free.fr
Tue Mar 2 00:49:11 PST 2010
Hi Reid,
>> 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?
the x86-64 ABI requires complex numbers to be passed *differently* to
a pair of scalar values. So if the LLVM code generators were to do the
lowering, then there would need to be a way to say: this pair of scalars
is just a pair of scalars - pass it normally; but this other pair of scalars
is really a complex number - pass it using a different method. If you take a
pessimistic view, then in order for LLVM to do the lowering then the entire C
type system would somehow have to be injected into the LLVM IR.
Ciao,
Duncan.
More information about the llvm-dev
mailing list