This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve alloca alignment
- From: Jeff Law <law at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, Richard Biener <richard dot guenther at gmail dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, nd <nd at arm dot com>
- Date: Tue, 19 Dec 2017 17:29:56 -0700
- Subject: Re: [PATCH] Improve alloca alignment
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB2053EFC180A8360BC943BEB883B90@DB6PR0801MB2053.eurprd08.prod.outlook.com> <DB6PR0801MB20535C2C2591DF11C3F240B9834C0@DB6PR0801MB2053.eurprd08.prod.outlook.com> <14674800-2a7d-67c4-ae39-942a356c3fcd@redhat.com> <1578416.cpZqCLpTxG@polaris>
On 12/13/2017 04:17 PM, Eric Botcazou wrote:
>> No clue, but ISTM that it should. Eric, can you try that and see if it
>> addresses these problems? I'd really like to get this wrapped up, but I
>> don't have access to any sparc systems to test it myself.
>
> Yes, the INIT_EXPANDERS trick works for SPARC (but this has nothing to do with
> SPARC_STACK_BIAS) and avoid hardcoding the bogus alignment assumption in the
> get_dynamic_stack_size function. As a matter of fact, this was the approach
> originally used by Dominik Vogt last year.
>
> Of course this doesn't address the same potential issue on other targets but
> you don't seem to care much about that, so who am I to do it after all? ;-)
>
> Tested on x86_64-suse-linux and SPARC/Solaris, applied on the mainline.
>
>
> 2017-12-13 Eric Botcazou <ebotcazou@adacore.com>
> Dominik Vogt <vogt@linux.vnet.ibm.com>
>
> PR middle-end/78468
> * emit-rtl.c (init_emit): Remove ??? comment.
> * explow.c (get_dynamic_stack_size): Take known alignment of stack
> pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY
> * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
> alignment of 3 virtual registers to BITS_PER_WORD.
>
> * config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
>
Thanks for taking care of this.
jeff