OSDN Git Service

[Stack realignment] Handling of aligned allocas.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 28 Nov 2015 11:02:32 +0000 (11:02 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Sat, 28 Nov 2015 11:02:32 +0000 (11:02 +0000)
commitbd9bd9e500364fef22520269ef95fe480ba0f708
tree543d1ec04de46f459bd48c3ed35097bbf4b978c8
parent697498bd8e5e2637150b9ee64a2c22809413a252
[Stack realignment] Handling of aligned allocas.

This patch implements dynamic realignment of stack objects for targets
with a non-realigned stack pointer. Behaviour in FunctionLoweringInfo
is changed so that for a target that has StackRealignable set to
false, over-aligned static allocas are considered to be variable-sized
objects and are handled with DYNAMIC_STACKALLOC nodes.

It would be good to group aligned allocas into a single big alloca as
an optimization, but this is yet todo.

SystemZ benefits from this, due to its stack frame layout.

New tests SystemZ/alloca-03.ll for aligned allocas, and
SystemZ/alloca-04.ll for "no-realign-stack" attribute on functions.

Review and help from Ulrich Weigand and Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254227 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineFrameInfo.h
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/Target/SystemZ/SystemZFrameLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/alloca-03.ll [new file with mode: 0644]
test/CodeGen/SystemZ/alloca-04.ll [new file with mode: 0644]