public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: Richard Biener <rguenther@suse.de>, Jan Hubicka <hubicka@ucw.cz>,
	Uros Bizjak <ubizjak@gmail.com>,
		GCC Patches <gcc-patches@gcc.gnu.org>,
	skpgkp1@gmail.com, 	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] i386: Separate costs of pseudo registers from hard registers
Date: Sat, 10 Aug 2019 00:47:00 -0000	[thread overview]
Message-ID: <CAMe9rOqk8FV64EjCpK=QBG7siUb9_dw1RkYVPDwzbQ3pQKAs=g@mail.gmail.com> (raw)
In-Reply-To: <3ccb3101-aac9-fd2f-65fb-b53ee0e98d54@redhat.com>

On Fri, Aug 9, 2019 at 3:01 PM Jeff Law <law@redhat.com> wrote:
>
> On 7/23/19 3:57 PM, H.J. Lu wrote:
> [ Snip ]
> > Here is the updated patch to improve register allocator and RTL
> > expressions independently.
> >
> > Any comments?
> >
> > Thanks.
> >
> >
> > -- H.J.
> >
> >
> > 0001-i386-Separate-costs-of-pseudo-registers-from-hard-re.patch
> >
> > From 79834daf252cecfc3ee51acd864641d2cdaff733 Mon Sep 17 00:00:00 2001
> > From: "H.J. Lu" <hjl.tools@gmail.com>
> > Date: Fri, 14 Jun 2019 13:30:16 -0700
> > Subject: [PATCH] i386: Separate costs of pseudo registers from hard registers
> >
> > processor_costs has costs of RTL expressions with pseudo registers and
> > and costs of hard register moves:
> >
> > 1. Costs of RTL expressions are used to generate the most efficient RTL
> > operations with pseudo registers.
> >
> > 2. Costs of hard register moves are used by register allocator to
> > decide how to allocate and move hard registers.
> >
> > Since relative costs of pseudo register load and store versus pseudo
> > register moves in RTL expressions can be different from relative costs
> > of hard registers, we should separate costs of RTL expressions with
> > pseudo registers from costs of hard registers so that register allocator
> > and RTL expressions can be improved independently.
> >
> > This patch moves costs of hard register moves to the new hard_register
> > field and duplicates costs of moves which are also used for costs of RTL
> > expressions.
> >
> >       PR target/90878
> >       * config/i386/i386.c (inline_memory_move_cost): Use hard_register
> >       for costs of hard register moves.
> >       (ix86_register_move_cost): Likewise.
> >       * config/i386/i386.h (processor_costs): Move costs of hard
> >       register moves to hard_register.  Add int_load, int_store,
> >       xmm_move, ymm_move, zmm_move, sse_to_integer, integer_to_sse,
> >       sse_load, sse_store, sse_unaligned_load and sse_unaligned_store
> >       for costs of RTL expressions.
> >       * config/i386/x86-tune-costs.h: Move costs of hard register
> >       moves to hard_register.  Duplicate int_load, int_store,
> >       xmm_move, ymm_move, zmm_move, sse_to_integer, integer_to_sse,
> >       sse_load, sse_store for costs of RTL expressions.
> This looks reasonable to me.  If you haven't had objections from Jan or
> Uros, go ahead and commit it.

Will do.

> I'm assuming this patch isn't supposed to actually change anything yet
> and a subsequent patch will twiddle some of the costs, particularly for
> skylake.
>

We have a one-line followup patch to actually fix:

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

Thanks.

-- 
H.J.

      reply	other threads:[~2019-08-09 23:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 16:27 [PATCH] i386: Separate costs of RTL expressions from costs of moves H.J. Lu
2019-06-20  7:40 ` Uros Bizjak
2019-06-20  7:43   ` Uros Bizjak
2019-06-20 15:19     ` H.J. Lu
2019-06-20 20:33       ` Uros Bizjak
2019-06-20 21:10         ` Jan Hubicka
2019-06-20 21:43           ` H.J. Lu
2019-06-23 11:18             ` Jan Hubicka
2019-06-24 13:37           ` Richard Biener
2019-06-24 16:16             ` H.J. Lu
2019-07-23 22:11               ` [PATCH] i386: Separate costs of pseudo registers from hard registers H.J. Lu
2019-08-05 21:21                 ` PING^1 " H.J. Lu
2019-08-09 22:14                 ` Jeff Law
2019-08-10  0:47                   ` H.J. Lu [this message]

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='CAMe9rOqk8FV64EjCpK=QBG7siUb9_dw1RkYVPDwzbQ3pQKAs=g@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=rguenther@suse.de \
    --cc=skpgkp1@gmail.com \
    --cc=ubizjak@gmail.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 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).