All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: Nigel Stephens <nigel@mips.com>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Richard Henderson <rth@redhat.com>,
	gcc-patches@gcc.gnu.org, linux-mips@linux-mips.org
Subject: Re: [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bit targets
Date: Tue, 03 Aug 2004 06:30:38 +0100	[thread overview]
Message-ID: <87acxcbxfl.fsf@redhat.com> (raw)
In-Reply-To: <410E9E25.7080104@mips.com> (Nigel Stephens's message of "Mon, 02 Aug 2004 21:03:49 +0100")

Nigel Stephens <nigel@mips.com> writes:
> I have a patch against gcc-3.4 which makes the 64-bit inline shifts
> somewhat smaller on ISAs which include the conditional move
> (movz/movn) instructions, but more importantly removes all branches
> from the inline code - which can be very expensive on long pipeline
> CPUs, since in this sort of code they tend to cause many branch
> mispredicts. Let me know if you want me to extract the patch - here's
> a table of the number of instructions generated by the original md
> pattern and the patched version:
>
> 		Instructions
> 		Old	New
> ashldi3		12	9
> ashrdi3		12	12
> lshrdi3		12	9
>
>
> If people really don't like the inline expansion, then maybe it could be
> enabled or disabled by a new -m option.

IMO, controlling with optimize_size would be enough.  But it sounds from
your description like the patch just adds a new hard-coded multi-insn
asm string.  Is that right?  If so, I'd really like to avoid that.

It would much better IMO if we handle this in the target-independent
parts of the compiler.  We can already open-code certain non-native
operations, it's "just" that wide shifts are a missing case.

If we handle it in a target-independent way, with each insn exposed
separately, we will be able to optimize special cases better.
We'll also get the usual scheduling benefits.

Richard

  reply	other threads:[~2004-08-03  5:30 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-19 15:35 [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bit targets Maciej W. Rozycki
2004-07-19 16:59 ` Richard Sandiford
2004-07-19 17:32   ` [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bittargets David Edelsohn
2004-07-19 17:33   ` [patch] MIPS/gcc: Revert removal of DImode shifts for 32-bit targets Maciej W. Rozycki
2004-07-19 17:37     ` Richard Sandiford
2004-07-19 21:38     ` Richard Henderson
2004-07-23 14:41       ` Maciej W. Rozycki
2004-07-23 20:27         ` Richard Henderson
2004-07-23 21:12           ` Ralf Baechle
2004-07-26 11:56             ` Maciej W. Rozycki
2004-08-02 20:03               ` Nigel Stephens
2004-08-03  5:30                 ` Richard Sandiford [this message]
2004-08-03  9:22                   ` Nigel Stephens
2004-08-03  9:36                     ` Richard Sandiford
2004-08-03  9:54                       ` Nigel Stephens
2004-08-04 19:57                         ` Maciej W. Rozycki
2004-08-04 20:37                           ` Nigel Stephens
2004-08-04 20:54                             ` Maciej W. Rozycki
2004-08-04 23:39                               ` Nigel Stephens
2004-08-07 19:01                           ` Richard Sandiford
2004-08-09 22:08                             ` Richard Henderson
2004-08-10  5:30                               ` Richard Sandiford
2004-08-10 23:20                                 ` Richard Henderson
2004-08-11  0:24                                   ` Andreas Schwab
2004-08-11  0:40                                   ` Paul Brook
2004-08-11  4:32                                     ` Richard Henderson
2004-08-31 19:51                                   ` Richard Sandiford
2004-09-03  6:53                                     ` Richard Henderson
2004-09-03  7:05                                       ` Richard Sandiford
2004-09-03  7:08                                         ` Richard Henderson
2004-09-03  7:11                                           ` Richard Sandiford
2004-09-03  7:20                                             ` Richard Henderson
2004-09-03  7:29                                               ` Richard Sandiford
2004-09-03 20:15                                                 ` Richard Henderson
2004-09-04  8:53                                                   ` Richard Sandiford
2004-09-05  0:03                                                     ` Richard Henderson

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=87acxcbxfl.fsf@redhat.com \
    --to=rsandifo@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=nigel@mips.com \
    --cc=ralf@linux-mips.org \
    --cc=rth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.