public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "segher at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/96017] Powerpc suboptimal register spill in likely path
Date: Thu, 02 Jul 2020 21:24:26 +0000	[thread overview]
Message-ID: <bug-96017-4-eZvHgzicMM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96017-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96017

--- Comment #11 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #9)
> (In reply to Peter Bergner from comment #8)
> > At first, I thought that split_live_ranges_for_shrink_wrap() split this
> > nicely, but what I found is that IRA assigned a volatile register to a
> > pseudo that is live across a call.
> 
> ...and that is because somehow flag_caller_saves is true.  I can't believe
> that is a good idea in general.

'-fcaller-saves'
     Enable allocation of values to registers that are clobbered by
     function calls, by emitting extra instructions to save and restore
     the registers around such calls.  Such allocation is done only when
     it seems to result in better code.

     This option is always enabled by default on certain machines,
     usually those which have no call-preserved registers to use
     instead.

     Enabled at levels '-O2', '-O3', '-Os'.

Note the "only when" line...  It sounds like (in spite of that promise) we
do it too aggressively currently?

  parent reply	other threads:[~2020-07-02 21:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  9:57 [Bug target/96017] New: " npiggin at gmail dot com
2020-07-01 10:01 ` [Bug target/96017] " wschmidt at gcc dot gnu.org
2020-07-01 10:02 ` wschmidt at gcc dot gnu.org
2020-07-01 10:06 ` wschmidt at gcc dot gnu.org
2020-07-01 10:21 ` npiggin at gmail dot com
2020-07-01 14:00 ` bergner at gcc dot gnu.org
2020-07-01 23:58 ` segher at gcc dot gnu.org
2020-07-02  1:18 ` bergner at gcc dot gnu.org
2020-07-02  1:24 ` bergner at gcc dot gnu.org
2020-07-02  2:06 ` bergner at gcc dot gnu.org
2020-07-02  2:45 ` bergner at gcc dot gnu.org
2020-07-02 21:22 ` segher at gcc dot gnu.org
2020-07-02 21:24 ` segher at gcc dot gnu.org [this message]
2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28  7:04 ` rguenth at gcc dot gnu.org
2023-11-24  8:46 ` jskumari at gcc dot gnu.org
2023-11-24  9:22 ` jskumari at gcc dot gnu.org

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=bug-96017-4-eZvHgzicMM@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).