[LLVMdev] How to represent __attribute__((fastcall)) functions in the IL

Renato Golin rengolin at systemcall.org
Sun Oct 21 05:03:23 PDT 2012

On 20 October 2012 19:39, Chandler Carruth <chandlerc at google.com> wrote:
> I think we just
> need a model for explicitly describing the required lowering, and
> hopefully in a way orthogonal to the LLVM IR type system so that we
> don't have to waste large amounts of IR complexity on shoving bits
> into and out of peculiar IR types.

We're not against that. The proposal is to move away the complexity
that front-ends need to handle by moving the code out to a PCSBuilder,
that would do the bridge between the language and the target parts of
the ABIs.

The IR would probably still have inreg, onstack and others, but at
least in a consistent way. We're not advocating for removing
information from the IR, but to make it consistent across all
front-ends, and hopefully easing the life of front-end engineers.

This PCSBuilder could have several versions (or a collation of
versions, via policies), so you could join the front and back parts of
ABIs on the fly, but that's irrelevant for the discussion at this

> Unfortunately, I have no such concrete design in mind, and I certainly
> still think that the onstack thing is a step in the right direction.

No arguments here. I'm happy with the 'onstack' flag.



More information about the llvm-dev mailing list