[cfe-commits] [PATCH] Target specific max stack alignment

Chad Rosier mcrosier at apple.com
Mon Jul 2 14:12:02 PDT 2012

On Jul 2, 2012, at 1:33 PM, Eli Friedman wrote:

> On Mon, Jul 2, 2012 at 1:25 PM, Chad Rosier <mcrosier at apple.com> wrote:
>> All,
>> The attached patch allows targets to specify a max stack alignment.  The goal is to prevent wasted stack space when locals are over aligned.  For example, the vector_size attribute infers the alignment to be the size of the vector unless explicitly set.  I've also added a warning to inform a user  when the target is enforcing a max alignment less then what they've explicitly requested.  Please let me know what you think..
> Making this a warning instead of a hard error makes no sense; you're
> telling people their program will be miscompiled, then compiling it
> anyway.

I wouldn't be opposed to making this a hard error if that's the consensus.  Of course this would only apply to the case where the user explicitly requests an alignment greater then the target bound.

> -Eli

More information about the cfe-commits mailing list