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

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 15 10:30:49 PST 2019

On Tue, Jan 15, 2019 at 10:23 AM David Greene <dag at cray.com> wrote:

> That would be great, but I'm not even sure how it would be possible
> given the multitude of frontend languages and their ABI expectations.
> Wouldn't we have to carry quite a lot of language semantic information
> around?  For example, AFAIK right now LLVM can't distinguish between an
> ordinary struct containing two doubles and double complex.  The various
> vector ABIs may treat those two types differently, for example.

Yep, we definitely would. Personally, I think we already pass so much
frontend info down in the form of argument attributes that we might as well
design a way to just directly say "these two doubles are C99 _Complex"
instead of saying inventing ad-hoc conventions like "a struct of two
doubles means one thing, but an array of two doubles means something else"
or repurposing attributes like byval and inreg.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190115/d05348aa/attachment.html>

More information about the llvm-dev mailing list