This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to align local PowerPC AltiVec arrays


On Mon, Mar 21, 2011 at 3:25 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Mar 21, 2011 at 3:21 PM, Wellander, Pat - Code Sourcery
> <pwelland@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]