[llvm-dev] [RFC] Introducing an explicit calling convention

David Greene via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 15 09:23:55 PST 2019


David Chisnall via llvm-dev <llvm-dev at lists.llvm.org> writes:

> I'm not opposed to this in principle, and actually I'd quite like to
> move in this direction and remove our reliance on undocumented and
> inconsistent conventions between the back end and the front end for
> conveying information about ABIs.  For example, returning two 32-bit
> integers or a pair of pointers on x86-32 requires returning the result
> in a single i64 in LLVM IR (on platforms where small structs are
> returned in registers, not on Linux), which is not particularly
> helpful for analysis or consistent with any other architecture.  Given
> that front ends have to be aware of calling conventions, it would be
> nice if they could express them in the same way that the ABI
> references do...

+1.  Coordinating ABI semantics between the frontend and LLVM is tricky.
It would be super helpful to have a formal way of expressing ABI
semantics in the IR.

                           -David


More information about the llvm-dev mailing list