[LLVMdev] comments on Bug 1521 (Revamp LLVM by-value structure passing)

Duncan Sands baldrick at free.fr
Tue Jun 26 07:13:53 PDT 2007


Hi Rafael,

> 2) add a "byref" mark in the pointer argument.

I think you mean "bycopy" or "byval" here.

> 3) Have llvm-gcc create a copy before calling the function.

Don't forget that the function may be called by code that
was not compiled by LLVM.  That's why we have to pay attention
to the ABI!  Solution (3) supposes we have control over both
callers and callees, but we need to handle the situation in
which we are calling code compiled by a different compiler,
or code compiled by a different compiler is calling us.

Ciao,

Duncan.



More information about the llvm-dev mailing list