[LLVMdev] Argument Lowering

Tim Northover t.p.northover at gmail.com
Tue Feb 12 11:36:05 PST 2013


>> At a purely implementation level, the first problem at the moment is
>> that IR-level types are discarded by the time call lowering happens.
>> Structures are split up into their constituent fields and those are
>> all a backend has available for its decisions.
>
> When you say, "Structures are split up into their constituent fields,"
> what do you mean, exactly?

By the time the backend gets to decide where arguments are going,
instead of seeing a prototype like

declare @foo({i32, i8, i64} %arg)

it gets presented with (essentially)

declare @foo(i32 %arg.1, i8 %arg.2, i64 %arg.3)

There's no hint that a structure was ever involved, let alone
information on its layout. I think that would be a fairly simple
matter to resolve though, if a little risky if not handled carefully.

Tim.



More information about the llvm-dev mailing list