[llvm-commits] [PATCH] Stack Alignment: clamp the alignment of stack objects in MachineFrameInfo

Manman Ren mren at apple.com
Fri Nov 30 12:12:20 PST 2012


Hi all,

Stack Alignment: when creating stack objects in MachineFrameInfo, make sure
the alignment is clamped to TargetFrameLowering.getStackAlignment if the target
does not support stack realignment or the option "realign-stack" is off.

This will cause miscompile if the address is treated as aligned and add is
replaced with or in DAGCombine.

Added a bool StackRealignable to TargetFrameLowering to check whether stack
realignment is implemented for the target. Also added a bool RealignOption
to MachineFrameInfo to check whether the option "realign-stack" is on.

Moved a few functions from MachineFrameInfo.h to .cpp and added clamping of
alignment to those functions.

Thanks for reviewing in advance,
Manman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alignment-arm-4.patch
Type: application/octet-stream
Size: 9505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121130/6838f7da/attachment.obj>


More information about the llvm-commits mailing list