public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@redhat.com>
To: Iain Sandoe <iain@codesourcery.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	       Gcc Patch List <gcc-patches@gcc.gnu.org>,
	anton@samba.org
Subject: Re: [PATCH] pr 63354 - gcc -pg -mprofile-kernel creates unused stack frames on leaf functions on ppc64le
Date: Tue, 24 Mar 2015 02:50:00 -0000	[thread overview]
Message-ID: <5510D0F3.4060606@redhat.com> (raw)
In-Reply-To: <210B149C-A8AB-4A0C-98AA-90D72741A7AF@codesourcery.com>

On 03/21/2015 01:48 PM, Iain Sandoe wrote:
> Hi Martin,
>
> I've applied your latest patch to top of trunk and looked at the code gen on powerpc-darwin9 (and a cross from x86-64-darwin12 => powerpc64-linux-gnu).

Thanks for the review!

>>>> 2015-03-13  Anton Blanchard  <anton@samba.org>
>>>>
>>>> 	PR target/63354
>>>> 	* gcc/config/rs6000/linux64.h (ARGET_KEEP_LEAF_WHEN_PROFILED): Define.
>>>                                         ^ typo

It's fixed in version 2 of the patch posted here:
https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00793.html

>
> This ^ will cause a bootstrap fail for every rs6000 target that doesn't include linux64.h.
> (because rs6000_keep_leaf_when_profiled will be "defined but unused").
>
> Since ISTM you intend this to apply to all rs6000 sub-targets, you might as well move it to rs6000.h?

The powerpc-darwin9 and powerpc64-darwin9 targets both built
successfully with this patch. I also tried powerpc64-freebsd,
which succeeded as well (though I had to work around pr65535).
What target do you suggest I try to reproduce the failure?
(I don't mind moving the macro definition as you suggest,
but I'd like to understand how to trigger the problem so
that I can reproduce it and verify that I've fixed it.)

>>>> --- /dev/null
>>>> +++ b/gcc/testsuite/gcc.target/powerpc/pr63354.c
>>>> @@ -0,0 +1,10 @@
>>>> +/* { dg-do compile { target { powerpc*-*-* } } } */
...
> a bare register # will, indeed, fail for Darwin's native assembler (which expects r#).

Thanks. I don't have access to Darwin but I changed the target
in version 2 of the patch to powerpc64*-linux* to make the test
unsupported only on Linux but now that I've tried running it on
a non-linux target I see it fails with:

dg-process-target-1: `{target powerpc64*-linux*}'
ERROR: gcc.target/powerpc/pr63354.c: syntax error in target selector 
"target powerpc64*-linux*" for " dg-do 1 compile { target { 
powerpc64*-linux* } } "

Changing the target to powerpc64*-*-linux* eliminates the
error and results in an unsupported test as intended. I'll
post a new patch with the fix for this and with one linux64.h
problem you mentioned above once I reproduce it and verify
that the suggested solution fixes it.

Martin

  reply	other threads:[~2015-03-24  2:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 21:55 Martin Sebor
2015-03-14 14:34 ` Segher Boessenkool
2015-03-15 23:40   ` Martin Sebor
2015-03-17 22:34     ` Segher Boessenkool
2015-03-21 19:48     ` Iain Sandoe
2015-03-24  2:50       ` Martin Sebor [this message]
2015-03-24  8:26         ` Iain Sandoe
2015-03-24 20:18           ` Martin Sebor
2015-03-24 11:51         ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5510D0F3.4060606@redhat.com \
    --to=msebor@redhat.com \
    --cc=anton@samba.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@codesourcery.com \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).