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

Manman Ren mren at apple.com
Fri Nov 30 14:21:55 PST 2012



On Nov 30, 2012, at 1:03 PM, Chad Rosier wrote:

> Manman,
> Just a quick comment.. ..not a full review.
> 
> How about adding a warning when we do in fact bound the alignment to something smaller then what was requested?

Good catch, patch is updated.

Thanks,
Manman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alignment-arm-5.patch
Type: application/octet-stream
Size: 10066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121130/bbdc5859/attachment.obj>
-------------- next part --------------

> 
> Chad
> 
> On Nov 30, 2012, at 12:12 PM, Manman Ren <mren at apple.com> wrote:
> 
>> 
>> 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
>> 
>> <alignment-arm-4.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list