[llvm-dev] Passing arguments and returning value of struct or class
Chanhyun Park via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 4 19:59:17 PST 2018
Hi all.
I'm new to LLVM and I'm having fun with LLVM.
Recently, I fount that function calls are changed based on the types of
return value and arguments.
For example, as following codes, the generated LLVM IRs are efferent from
what I expected them would be.
-------------------
// simple C code
struct Float2
{
float x; float y;
}
Float2 foo(Float2 a)
-------------------
// simple LLVM IR
i64 foo(i64 a)
------------------------
Even, if the size of structure is bigger than 64bit, the LLVM IRs are as
follow.
------------------------
void foo( struct. Float2* , struct.Float2 * )
------------------------
So. I wonder where can I find these rules? I googled but I could not found
official documents or something likes that.
Please help me.
Thanks.
Chanhyun.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181205/8a668c12/attachment.html>
More information about the llvm-dev
mailing list