[LLVMdev] Starting implementation of 'inalloca' parameter attribute for MS C++ ABI pass-by-value

Chandler Carruth chandlerc at google.com
Tue Oct 22 14:31:30 PDT 2013


On Tue, Oct 22, 2013 at 2:14 PM, Reid Kleckner <rnk at google.com> wrote:

> I wanted to mention that I'm planning to start writing and sending out
> patches for this.
>
> Naming the attribute 'alloca' was really confusing, so I'd like to change
> it to 'inalloca', which follows the preposition pattern of inreg and byval.
>
> After discussion, we decided it was silly to add stackbase uses to alloca
> instructions.  They should stay simple.
>
> Instead, we'll clarify that it is illegal for an optimization to raise an
> alloca used as an inalloca argument across a stacksave, and fix any
> transforms that do this.  In particular, I'll look at the inliner, which is
> the most likely to move allocas.
>
> Furthermore, any call that uses an inalloca argument must have an
> associated stackrestore field, regardless of whether it's callee cleanup
> (thiscall) or caller cleanup (cdecl).  The backend will be responsible for
> restoring the stack pointer on both return and exception edges.
>

I just wanted to give an explicit thumbs up on the mailing list on these
issues.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131022/71b57c09/attachment.html>


More information about the llvm-dev mailing list