Actually, after reinvestigating this, "AFAIK, the vectorizer is smart enough to automagically increase alignment on global arrays" so is not of concern to Freescale. Also, Changing the alignment of arrays within structs would change the field layout and would violate the ABI and be incompatible with other non-AltiVec hardware.
Pat On 3/21/2011 3:26 PM, Andrew Pinski wrote: > On Mon, Mar 21, 2011 at 3:25 PM, Andrew Pinski <pins...@gmail.com> wrote: >> On Mon, Mar 21, 2011 at 3:21 PM, Wellander, Pat - Code Sourcery >> <pwell...@codesourcery.com> wrote: >>> The stack is aligned at 16 bytes with AltiVec (if not, this patch would not >>> make sense). >>> Also, all char arrays are aligned at 16 bytes. >>> This patch causes other local stack arrays >= 16 bytes to be aligned at 16 >>> bytes in order to >>> make more effective use of AltiVec instructions. >> >> Then why not change it so not just auto arrays are aligned at 16 >> bytes, just like char arrays? > > Also what about structs containing just arrays? Should you have those > aligned too? > > -- Pinski