This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR target/69454] Disable TARGET_STV when stack is not properly aligned
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Ilya Enkovich <enkovich dot gnu at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 2 Feb 2016 04:30:00 -0800
- Subject: Re: [PATCH, PR target/69454] Disable TARGET_STV when stack is not properly aligned
- Authentication-results: sourceware.org; auth=none
- References: <20160127154448 dot GQ3017 at tucnak dot redhat dot com> <20160127161137 dot GB16081 at msticlxl57 dot ims dot intel dot com> <CAMe9rOoo1KN3K+vhWh5POE0trO-8wbpTdmC8mkXWNCLqn4sWVA at mail dot gmail dot com> <CAMbmDYbGp6WxxCh0rKUsU+UD70KfR=8G8dNQbCegoSBanB3NRw at mail dot gmail dot com> <CAMe9rOrDbzVCRfkLFiCCbF80D3R2XyMm6REbSsTZGhjdfbP2fQ at mail dot gmail dot com> <CAMe9rOqywZwxDSO+9SyF8HoG=ai=26MMBnBGKPCvz_wxFhEB0g at mail dot gmail dot com> <CAMbmDYbkroApwkXDrvZbdCtMAJPrSZSmzxhRunc2TprKce4e0A at mail dot gmail dot com> <CAMe9rOodyrX36aFM=sv98+cvWskRdKnmJEdsvU6nQdRhs5UoCA at mail dot gmail dot com> <20160202115338 dot GP3017 at tucnak dot redhat dot com> <CAFULd4YKsOs6bdsOQ-P0HbU0NvDAS8asEdYUR3Yh=Fa5=0F53w at mail dot gmail dot com> <20160202122922 dot GQ3017 at tucnak dot redhat dot com>
On Tue, Feb 2, 2016 at 4:29 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Tue, Feb 02, 2016 at 01:24:26PM +0100, Uros Bizjak wrote:
>> On Tue, Feb 2, 2016 at 12:53 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> >> The bottom line is ix86_minimum_alignment must return the correct
>> >> number for DImode or you can just turn off STV. My suggestion is
>> >> to use my patch.
>> >
>> > Uros, any preferences here? I mean, it is possible to use
>> > e.g. the ix86_option_override_internal and have H.J's ix86_minimum_alignment
>> > change as a safety net, in the usual case for -mpreferred-stack-boundary=2
>> > we'll just disable TARGET_STV and ix86_minimum_alignment change won't do
>> > anything, as TARGET_STV will be false, and if for whatever case it gets
>> > through (target attribute, -mincoming-stack-boundary=, ...)
>> > ix86_minimum_alignment will be there to ensure enough stack alignment.
>> > Most of the smaller -mpreferred-stack-boundary= uses are -mno-sse anyway,
>> > and that is something we don't want to affect.
>>
>> IMO, we should disable STV when -mpreferred-stack-boundary < 3, as STV
>> is only an optimization. Perhaps we can also emit a "sorry" for
>> explicit -mstv in case stack boundary requirement is not satisfied.
>> *If* there is a need for -mstv with smaller stack boundary, we can
>> revisit this decision for later gcc versions.
>>
>> I think disabling STV is less surprising option than increasing stack
>> boundary behind the user's back.
>
> So, is http://gcc.gnu.org/ml/gcc-patches/2016-01/msg02129.html
> ok for trunk then (alone or with additional sorry, incremental or not?)?
> I believe it does just that.
This patch is WRONG.
--
H.J.