public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Jan Hubička" <honza.hubicka@gmail.com>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: "Kumar, Venkataramanan" <Venkataramanan.Kumar@amd.com>,
	Jakub Jelinek <jakub@redhat.com>,
	 Richard Biener <richard.guenther@gmail.com>,
	 "Joshi, Tejas Sanjay" <TejasSanjay.Joshi@amd.com>,
	 "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [X86_64]: Enable support for next generation AMD Zen4 CPU
Date: Mon, 24 Oct 2022 16:40:13 +0200	[thread overview]
Message-ID: <CAJf+ejcF673_p=qD=eDJSifKGXtLe9EEHE678Ru1LsEWxEOwbQ@mail.gmail.com> (raw)
In-Reply-To: <b2a990f8-b43e-aeb2-70f2-99968f62e9cc@ispras.ru>

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

On Mon, Oct 24, 2022 at 4:26 PM Alexander Monakov <amonakov@ispras.ru>
wrote:

> > > > This grew insn-automata.cc from 201502 lines to 639968 lines and the
> > > > build of the automata (genautomata) to several minutes in my dev
> tree.
> > >
> > > Yeah, in my unoptimized non-bootstrapped development tree genautomata
> > > now takes over 12 minutes on a fast box, that is simply not acceptable.
> >
> > Thank you for notifying us.
> >
> > TejasSanjay.Joshi@amd.com has posted a patch for review to fix this (as
> per Honza's comments).
> > Ref: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604144.html


This patch is OK

>
>
> By the way, it appears pre-existing znver[123] models are also causing
> some kind
> of combinatorial blow-up, but before znver4 it was not a blocking issue:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87832


It is really easy to make DFA size to grow if there are possibly many
instructions in the pipeline (as every possible state of a modelled pipeline
needs to be a new state of the automaton). This is essentially
depth_of_pipeline * number_of_units with additional states to repesent
special instructions and this naturally keeps growing.

We could try to break the FP automata into multiple ones, but there are
instructions that can go down any pipe which makes this hard
or we can try toreduce number of different reservation types (possibly by
breaking the automaton to znver1-3 and 4 or so).
With znver2 model I experimented with broken up version and common one and
ended up with smaller binary for combined one.

Honza

>
>
> Alexander
>

  reply	other threads:[~2022-10-24 14:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 15:32 Joshi, Tejas Sanjay
2022-10-16 17:48 ` Uros Bizjak
2022-10-17 14:39   ` Joshi, Tejas Sanjay
2022-10-21  9:59     ` Kumar, Venkataramanan
2022-10-21 11:51       ` Richard Biener
2022-10-21 12:52         ` Jan Hubicka
2022-10-21 14:02           ` Joshi, Tejas Sanjay
2022-10-21 17:59             ` Joshi, Tejas Sanjay
2022-10-22 17:11         ` Jakub Jelinek
2022-10-23 14:29           ` Kumar, Venkataramanan
2022-10-24 14:26             ` Alexander Monakov
2022-10-24 14:40               ` Jan Hubička [this message]
2022-10-24 18:47                 ` Alexander Monakov
2022-10-26 18:07                   ` Kumar, Venkataramanan
2022-10-26 18:23                     ` Alexander Monakov
2022-10-31 10:39                       ` Joshi, Tejas Sanjay
2022-10-31 10:59                         ` Jan Hubička
2022-11-01 12:22                           ` Alexander Monakov
2022-10-25  9:17                 ` 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='CAJf+ejcF673_p=qD=eDJSifKGXtLe9EEHE678Ru1LsEWxEOwbQ@mail.gmail.com' \
    --to=honza.hubicka@gmail.com \
    --cc=TejasSanjay.Joshi@amd.com \
    --cc=Venkataramanan.Kumar@amd.com \
    --cc=amonakov@ispras.ru \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=richard.guenther@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).