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
What you are suggesting makes sense to me. This change was made per a
request from Freescale which was limited to local arrays. As this is my
first gcc change, I just followed the request.
I would think if all larger structs were aligned also, this could help
make struct assignments more efficient.
Of course there is more wasted memory, but maybe AltiVec users don't
care about this.
Pat