[cfe-commits] r81602 - in /cfe/trunk: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp test/CodeGen/blocks-aligned-byref-variable.c
Chris Lattner
clattner at apple.com
Sat Sep 12 12:54:41 PDT 2009
On Sep 12, 2009, at 11:58 AM, Mike Stump wrote:
> On Sep 11, 2009, at 7:44 PM, Anders Carlsson wrote:
>> URL: http://llvm.org/viewvc/llvm-project?rev=81602&view=rev
>> Log:
>> Add support for __block variables with alignment greater than
>> __alignof(void *).
>
> Unfortunately, we also need a sema error for alignment larger than the
> minimum of the maximal stack alignmint and the alignment of malloc on
> the system. For darwin, I think that means 16. Also, ordinary stack
> decls that request larger than the maximal stack alignment the system
> conspires to allow need a sema error as well. In time, people might
> include the required alignment in the block and a flag to request more
> than the standard align in the blocks runtime, but until then... I've
> added a FIXME.
Why? Codegen should just set the right alignment on the alloca. The
LLVM backend will realign the stack as needed. This is the same as
any other oversized align on an automatic var.
-Chris
More information about the cfe-commits
mailing list