[cfe-dev] Passing StructType arguments directly
pdox at google.com
Sun Sep 18 05:08:56 CDT 2011
Thanks for your reply.
I am surprised to hear that this method of argument passing is
discouraged. Do you have a reference, or know the reasoning?
The IR is our primary representation. PNaCl is a project to bring LLVM
into the browser. For example, to recognize bitcode for JIT execution
(similar to Emscripten). In order to maintain linkability between
different front-ends, and to maintain platform ABI compatibility,
we're setting everything up to use a high-level representation.
I will try adding a new ABIArgInfo kind.
On Sun, Sep 18, 2011 at 2:21 AM, John McCall <rjmccall at apple.com> wrote:
> On Sep 17, 2011, at 3:49 PM, David Meyer wrote:
>> I am working with Ivan Krasin on the PNaCl target in Clang. Our ABI
>> requires that aggregates are passed as first class types in bitcode.
> Your ABI requires a specific IR representation? One which the LLVM core developers are trying to strongly discourage?
> Anyway, this step is not actually bypassable; there is just not any code in Clang to pass structs as true FCAs. You could probably convince Clang to pass your structure using byval, if that would be good enough. Otherwise, you'll probably have to add a whole new style of argument passing.
More information about the cfe-dev