This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR66870 ppc64le, ppc64 split stack
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "Lynn A. Boger" <laboger at linux dot vnet dot ibm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 Jul 2015 05:00:28 -0400
- Subject: Re: [PATCH] Fix PR66870 ppc64le, ppc64 split stack
- Authentication-results: sourceware.org; auth=none
- References: <55BA8954 dot 6070101 at linux dot vnet dot ibm dot com> <20150731040010 dot GU26017 at bubble dot grove dot modra dot org>
On Fri, Jul 31, 2015 at 12:00 AM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Jul 30, 2015 at 03:30:12PM -0500, Lynn A. Boger wrote:
>> PR66870
>> * gcc/config/rs6000/rs6000.c: Add check for no_split_stack
>> function attribute along with flag_split_stack check to
>> determine when to generate split stack prologue for
>> ppc64 and ppc64le.
>
> Looks good to me, except that the changelog entry should mention the
> modified functions, for example:
>
> PR target/66870
> * gcc/config/rs6000/rs6000.c (rs6000_emit_prologue): Check for
> no_split_stack function attribute along with flag_split_stack.
> (rs6000_expand_split_stack_prologue): Likewise.
>
> Also, formatting rules for gcc say to not split a line after an
> operator.
>
>> + int using_split_stack = flag_split_stack &&
>> + (lookup_attribute ("no_split_stack", DECL_ATTRIBUTES (cfun->decl))
>> + == NULL);
>
> The "&&" belongs on the next line, with parentheses added so that emacs
> and indent will line up the continuation nicely.
>
> int using_split_stack = (flag_split_stack
> && (lookup_attribute ("no_split_stack",
> DECL_ATTRIBUTES (cfun->decl))
> == NULL));
>
>
> David, the following is another piece of the PR66870 fixes. This
> stops shrink-wrap from moving insns around in the first few blocks of
> a function, in a way that is incorrect given that r12 is live.
> Bootstrapped and regression tested powerpc64le-linux (and
> powerpc64-linux by Lynn).
>
> PR target/66870
> * config/rs6000/rs6000.c (machine_function): Add split_stack_argp_used.
> (rs6000_emit_prologue): Set it.
> (rs6000_set_up_by_prologue): Specify r12 when split_stack_argp_used.
Both patches with your suggested changes are okay.
Thanks, David