[cfe-commits] Alignment of return from __builtin_alloca

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Jun 7 17:22:01 PDT 2012


On Jun 7, 2012, at 4:33 PM, Chandler Carruth <chandlerc at google.com> wrote:

> However, it does seem like this should be no more than an 'and' instruction in the worst case (we don't have known alignment of the stack).

Realigning the stack requires the function to have a frame pointer, so frame pointer elimination is no longer possible. If you  have dynamically sized allocas, a reserved base pointer register is also necessary.

Reserving 2 out of 7 registers on x86 can have quite the performance impact.

Base pointer support is quite new, BTW. Previously, we simply refused to compile functions that required stack realignment and dynamic allocas.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120607/e6692aa5/attachment.html>


More information about the cfe-commits mailing list