public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: "Joshi, Tejas Sanjay" <TejasSanjay.Joshi@amd.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"Kumar, Venkataramanan" <Venkataramanan.Kumar@amd.com>
Subject: Re: [PATCH][X86_64] Separate znver4 insn reservations from older znvers
Date: Tue, 3 Jan 2023 19:28:49 +0100	[thread overview]
Message-ID: <Y7Rz4UbUOI2ZF3Wt@kam.mff.cuni.cz> (raw)
In-Reply-To: <b601342a-2927-cb40-27d0-30d149a8c9f1@ispras.ru>

> 
> On Tue, 3 Jan 2023, Jan Hubicka wrote:
> 
> > > 	* gcc/common/config/i386/i386-common.cc (processor_alias_table):
> > > 	Use CPU_ZNVER4 for znver4.
> > > 	* config/i386/i386.md: Add znver4.md.
> > > 	* config/i386/znver4.md: New.
> > OK,
> > thanks!
> 
> Honza, I'm curious what are your further plans for this, you mentioned
> merging znver4.md back in znver.md if I recall correctly?

I was looking into that over Christmas (and it was also reason for my
first pass through where I was asking for various differences).  There
are number of small divergences between znver.md and znver4.md that seem
to make the merged automaton bigger than having two automatons.
So merging both meaningfuly would mean modifying znver1-3 model or
znver4 models.  With Tejas I think we mostly verified that the areas
znver4 modes is different from znver1-3 are correct for znver4 and
sometimes also for znver3 (for example the branching unit is present
already there but not bodelled).

Splitting znver1-3 and 4 is definitly not optimal.  However given the
time constrains and desire to not break znver1-3 I think going with
znver4.md is good option at least for GCC12/13.

Overall I am not sure how beneficial the model overall is:
since we schedule on BB basis and model CPU as in-order with no register
renaming, the scheduler has rarely chance to fill most of execution
units and de-facto optimizes for wastly different CPU than reality is).
We get noticebale SPEC perfomance boost for -fschedule-insns2 but it
seems to be mostly for scheduling for latencies.
LLVM's model seems to do more than we do, but comparing both compilers
I was not really able to tell if either of them get noticeable benefit
from the actual model of reservation units (and not only latencies).

I would welcome toughts/ideas/measurements on this.
Honza
> 
> Alexander

  reply	other threads:[~2023-01-03 18:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 16:18 Joshi, Tejas Sanjay
2022-11-14 18:51 ` Alexander Monakov
2022-11-15 12:08   ` Joshi, Tejas Sanjay
2022-11-15 12:51     ` Alexander Monakov
2022-11-21 11:40       ` Joshi, Tejas Sanjay
2022-11-21 15:30         ` Alexander Monakov
2022-12-01 11:28           ` Joshi, Tejas Sanjay
2022-12-01 19:01             ` Alexander Monakov
2022-12-12 21:41             ` Jan Hubička
2022-12-22 17:34               ` Joshi, Tejas Sanjay
2023-01-03 14:36                 ` Jan Hubicka
2023-01-03 14:52                   ` Alexander Monakov
2023-01-03 18:28                     ` Jan Hubicka [this message]
2023-01-05  5:52                   ` Joshi, Tejas Sanjay

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=Y7Rz4UbUOI2ZF3Wt@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=TejasSanjay.Joshi@amd.com \
    --cc=Venkataramanan.Kumar@amd.com \
    --cc=amonakov@ispras.ru \
    --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).