public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Pat Haugen <pthaugen@linux.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Cc: David Edelsohn <dje.gcc@gmail.com>,
	Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH] rs6000: Disable -fcaller-saves by default
Date: Thu, 23 Jul 2020 13:42:59 -0600	[thread overview]
Message-ID: <b70f54b130538d7a2037d9a690fc64e6b485cd7a.camel@redhat.com> (raw)
In-Reply-To: <8cc18935-a9aa-513f-eef2-154130b70a3b@linux.ibm.com>

On Thu, 2020-07-23 at 14:25 -0500, Pat Haugen via Gcc-patches wrote:
> Disable -fcaller-saves by default.
> 
> This patch turns off -fcaller-saves by default so that IRA doesn't try
> to use volatile regs for pseudos that are live across a call, which
> would then require LRA to save/restore the reg around the call.
> 
> Bootstrap/regtest on powerpc64le with no new regressions. Also ran a
> CPU2017 benchmark comparison with no major differences (a few minor
> improvements and one minor degradation). Ok for trunk?
> 
> -Pat
> 
> 
> 2020-07-23  Pat Haugen  <pthaugen@linux.ibm.com>
> 
> gcc/
> 	* common/config/rs6000/rs6000-common.c
> 	(rs6000_option_optimization_table): Turn off -fcaller-saves.
> 
> gcc/testsuite/
> 	* gcc.target/powerpc/caller-saves.c: New.
What's driving this change?

IRA will do a cost/benefit analysis to see using call clobbered registers like
this is profitable or not.  You're just turning the whole thing off.

This can be particularly bad for performance if you have classes with no call
saved registers.

Jeff


  reply	other threads:[~2020-07-23 19:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 19:25 Pat Haugen
2020-07-23 19:42 ` Jeff Law [this message]
2020-07-23 20:19   ` Segher Boessenkool
2020-07-23 20:29     ` Jeff Law
2020-07-23 20:43       ` Segher Boessenkool
2020-08-10 16:11       ` Peter Bergner
2020-08-25 20:35         ` Jeff Law
2020-08-26 20:58           ` Segher Boessenkool
2020-08-26 21:10             ` Jeff Law

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=b70f54b130538d7a2037d9a690fc64e6b485cd7a.camel@redhat.com \
    --to=law@redhat.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pthaugen@linux.ibm.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).