[llvm-commits] [llvm] r169197 - in /llvm/trunk: include/llvm/CodeGen/MachineFrameInfo.h include/llvm/Target/TargetFrameLowering.h lib/CodeGen/MachineFunction.cpp test/CodeGen/ARM/alloc-no-stack-realign.ll

Eric Christopher echristo at gmail.com
Mon Dec 10 14:22:10 PST 2012


> This patch will emit a warning if the alignment is actually clamped.
> > It is hard to say whether we should emit a warning or throw a fatal
> error.
>
> IMO, it should be an error; users will never see the message otherwise.
>
> > When creating stack object, we use Align
> > Align = std::max((unsigned)TLI.getDataLayout()->getPrefTypeAlignment(Ty),
> >                    AI->getAlignment());
> > The preferred alignment may be too big for the target, and it makes
> sense to give a warning instead of a fatal error.
>
> If we can't realign the stack, we should print an error if
> AI->getAlignment() is too large and simply ignore the return of
> getPrefTypeAlignment if it's too large.


+1000

There's no knowing what is depending upon the requested alignment and so
this could silently break code.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121210/5c57cc79/attachment.html>


More information about the llvm-commits mailing list