[LLVMdev] comments on Bug 1521 (Revamp LLVM by-value structure passing)
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Jun 26 06:59:03 PDT 2007
On 26 jun 2007, at 15:30, Rafael EspĂndola wrote:
> What I like about option 3 is that llvm continues to be unaware about
> the C struct passing convention. This is good since another FE (D,
> ADA) might want to have a different way of passing
> structs/objects/whatever. If we specialize on the C way of doing
> things I thing that other FE will have to come up with their own
> solutions and might not get as good code.
What you described is not "the C way" of doing things, but the ABI
way. How arguments are passed should not be source language
dependent, but calling convention dependent. I think that if other
source languages require other calling conventions, either new
calling conventions should be added to LLVM, or the frontends for
those languages should emulate their particular requirements using
tricks like your third proposal (and e.g. by turning parameter types
implicitly into pointer types).
Jonas
More information about the llvm-dev
mailing list