[cfe-dev] alignment of local variables

Chris Lattner clattner at apple.com
Mon Mar 28 16:06:32 PDT 2011


On Mar 28, 2011, at 10:40 AM, Akira Hatanaka wrote:

> I understand it is probably not right to ignore alignment attributes in the source code, but I just wanted to know if it is an option, because some gcc backends (e.g. mips) seem to do that. 

We don't currently have a way to do this, but we could add it.  We'd just add a "MaxStackAlignment" setting to target info (the default being "none") and targets could specify their limits this way.

-Chris



>  
> On Mon, Mar 28, 2011 at 10:35 AM, Eric Christopher <echristo at apple.com> wrote:
> 
> On Mar 28, 2011, at 10:28 AM, Akira Hatanaka wrote:
> 
> > I just wanted to know if it is absolutely necessary to implement dynamic stack realignment in the backend. If the maximum alignment is no larger than the default alignment of the run-time stack, you won't have to adjust the stack pointer at run-time.
> 
> You'll run into other problems where people have requested an alignment and then depend upon it.
> 
> -eric
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110328/060e8685/attachment.html>


More information about the cfe-dev mailing list