public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: David Edelsohn <dje.gcc@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [RS6000] Fix PR61098, Poor code setting count register
Date: Sun, 11 May 2014 23:39:00 -0000	[thread overview]
Message-ID: <20140511233923.GI5162@bubble.grove.modra.org> (raw)
In-Reply-To: <20140511225316.GH5162@bubble.grove.modra.org>

On Mon, May 12, 2014 at 08:23:16AM +0930, Alan Modra wrote:
> On Sat, May 10, 2014 at 10:24:34PM -0400, David Edelsohn wrote:
> > On Thu, May 8, 2014 at 10:40 PM, Alan Modra <amodra@gmail.com> wrote:
> > > rs6000_emit_set_const ... always returns a non-zero result ...
> > 
> > Can you help clarify the removal of the code that tests if the
> > splitter failed?
> 
> See above.

On thinking some more, let me retract the patch for the time being.
While it's true that I was only removing dead code in the splitters,
the question of why this code has become dead is worth looking into.

I suspect a previous patch to rs6000_emit_set_const was wrong, and
that we should in fact be failing before reload (but never after),
when an expansion would take too many instructions.  "Too many" being
a sequence that is slower than loading a 64-bit constant from the
TOC.

We try to make that sort of tradeoff in rs6000_emit_move (see
num_insn_constant call), but that is really too early.  Some
manipulations of code modify constants.  I've seen cases where
rs6000_emit_move decided to inline a constant, but later changes to
the value meant the expansion was five instructions.

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2014-05-11 23:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08  1:49 Alan Modra
2014-05-08 13:48 ` David Edelsohn
2014-05-09  2:41   ` Alan Modra
2014-05-11  2:24     ` David Edelsohn
2014-05-11 22:53       ` Alan Modra
2014-05-11 23:39         ` Alan Modra [this message]
2014-05-14  3:05       ` Alan Modra
2014-05-14  3:46         ` David Edelsohn
2014-05-14  9:56           ` Alan Modra
2014-05-14 21:27             ` David Edelsohn
2014-05-23 15:23             ` Alan Modra
2014-05-24 16:26               ` David Edelsohn

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=20140511233923.GI5162@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@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).