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: [RFA]: Merge stack alignment branch


Andrew,

Since your scheme works with reload, maybe both scheme can work together
as complement to each other. This patch handles stack alignment
correctly and efficiently for most of cases. But due to some corner
cases in reload, it handles alignment conservatively. If both scheme
work together, the result can be efficient for most of cases and
accurate for corner cases.

Thanks - Joey

-----Original Message-----
From: gcc-patches-owner@gcc.gnu.org
[mailto:gcc-patches-owner@gcc.gnu.org] On Behalf Of Andrew Pinski
Sent: Saturday, April 05, 2008 2:45 AM
To: H.J. Lu
Cc: Ye, Joey; GCC Patches; Lu, Hongjiu; Guo, Xuepeng;
<ubizjak@gmail.com>
Subject: Re: [RFA]: Merge stack alignment branch

On Fri, Apr 4, 2008 at 5:35 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>  Does your scheme work with reload? To support AVX, we need to
>  align stack to 32byte whenever AVX register is accessed on stack.
>  That will be a very common case when -mavx is used.  But we want
>  to keep preferred stack boundary, which defines incoming stack
>  boundary, as 16byte for binary compatibility.

Yes it works with reload.  The variable gets reloaded to a stack slot
which is aligned correctly.  The stack on x86 is still aligned to the
word boundary but the variables get aligned to the correct alignment.

There is still a bug with respect of VLA's not getting the correct
alignment.  This happens with your scheme also.

Thanks,
Andrew Pinski


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