[PATCH] Handling of aligned allocas / stack alignment

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 09:50:44 PDT 2015


Hi,

I have been working on a patch to implement dynamic realignment for a 
target that does not align the stack pinter to any greater alignment 
than the normal alignment (SystemZ).

The patch changes the behaviour in FunctionLoweringInfo, so that for a 
target that has a non-realignable stack, greaterly-aligned static 
allocas are considered to be variable-sized objects and are handled with 
a DYNAMIC_STACKALLOC node.

I am not sure about the "no-realign-stack" Function attribute. Is this 
an attribute that is only relevant to targets that generally realign the 
stack? Or does it make any target required to drop all alignments of 
allocas? I would appreciate any comments and opinions on this. 
(Depending on what is the correct approach, this also affects when 
warnings should be printed for dropped alignments, as can be seen in 
this non-final patch).

(resending a somewhat updated patch)

/Jonas Paulsson

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-SystemZ-Handling-of-aligned-allocas.patch
Type: text/x-patch
Size: 15118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151023/31cf0e42/attachment.bin>


More information about the llvm-commits mailing list