(original) (raw)
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.