search for: cpp_num

Displaying 3 results from an estimated 3 matches for "cpp_num".

2007 Jun 26
3
[LLVMdev] comments on Bug 1521 (Revamp LLVM by-value structure passing)
This is my current understanding of the current situation and the proposed solution. Currently llvm-gcc compiles ----------------------- struct cpp_num { unsigned long high; unsigned long low; char unsignedp; }; void g(unsigned long); void f(struct cpp_num num) { g(num.high + 1); } ---------------------- into --------------------------------------------------------------------------- define void @f(i64 %num.0.0, i64 %num.0.1, i64 %num.0....
2007 Jun 26
1
[LLVMdev] comments on Bug 1521 (Revamp LLVM by-value structure passing)
...possible, but that would be a much bigger change then I thought. So, I think that the only question left before I try to implement Chris's solution is why it is better to have a "byval" attribute instead of adding support for struct in arguments? That is, why define void @f(%struct.cpp_num* %num byval) is better then define void @f(%struct cpp_num %num) Just curious :-) > Ciao, > > Duncan. > Thanks a lot, Rafael
2007 Jun 26
0
[LLVMdev] comments on Bug 1521 (Revamp LLVM by-value structure passing)
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