[PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

Friedman, Eli via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 10:45:50 PDT 2016


It probably makes sense to say that alloca should have the same 
alignment as the default stack alignment, simply because it's hard to do 
anything useful with completely unaligned memory.  That said, the 
default stack alignment is 4 bytes on 32-bit Windows, not 16.

-Eli

On 9/9/2016 10:29 AM, Richard Smith wrote:
> There's an (unconvincing to me) explanation for why gcc does this 
> here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19131
>
> On 9 Sep 2016 10:14 am, "Eli Friedman" <efriedma at codeaurora.org 
> <mailto:efriedma at codeaurora.org>> wrote:
>
>     efriedma added a comment.
>
>     This is probably going to lead to someone complaining about clang
>     realigning the stack on 32-bit Windows; are your sure we're
>     choosing the right alignment there?
>
>
>     https://reviews.llvm.org/D24378 <https://reviews.llvm.org/D24378>
>
>
>
-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

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


More information about the cfe-commits mailing list