From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by sourceware.org (Postfix) with ESMTPS id 38E9E3858421 for ; Mon, 24 Oct 2022 14:40:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38E9E3858421 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-xb34.google.com with SMTP id j130so11231313ybj.9 for ; Mon, 24 Oct 2022 07:40:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZBDk4VjS+AHoZoOWGh8Tb4xS/1vYpphh1/o23zA9x9c=; b=YUomQo3aoE7MarJnpRRkJSbqsoHChNGI7B+sXr25mD1k7GpO0NkCIuTxW29zxoCkhM +W7hiYF6dp9h9jWG6M9gmqYKEkhaHoOi7QAuglzj64b6bigR4Dy8685f6tPg9cNvhhYa y8AXqrS+PmnTTr70jX/Rv3WzmfuQLT8CtyVAfZC7ijcwgoRTaDBWVi3MFNxhlZ/TL1Ab yGyQ81NHtl/6FT8ixhWvxnIKJ4TlQay9SezDibMkIRvvGvUKY/cB+DwjCu/ow57e8rey 4gUtSDBDEt/8mb74fCX9FgrF4WZhO9gLeM9X80jlfOu5QJTf9e57W/wC9/kJ2C7mtDtc Th1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZBDk4VjS+AHoZoOWGh8Tb4xS/1vYpphh1/o23zA9x9c=; b=5+Ptqk1C7DUCkJA4n1HyqI2nkgDdHmIS0l3AXBkMMJKhgdClTEsURLKwXT2ukDRJlQ uvLzQvT+t+RkatbVg70K5H1Sas0Zd5EPH2UNsadmlq9KG4JCl/xxe6ZgoHNA+fiaKTnX SqCNZjhL0LbxK3D5lB0BW2zXdpg/bGLtsidU8yZWcMRnoLhCxDbNWUajACtrbK0baEs+ k4Y7dS4XrNwUpdd2TdMjJ0K7HI80ScgEIE/jZu5Tp0Mfhqu9cVjbH8P2fn9OTZk5LdNu P+HtCOUVA63xKW2OfZdY3jD28qbDq/ma4dlRp5gQDFYWulkPsoXX4PHGEM+w+jjH1/l9 FbOg== X-Gm-Message-State: ACrzQf1MYi2w9ryIj3rsaTBebBgUcxk8jDGJ7F1KXLn8dH1YmcqQY8Bc FZNBg9eOweYi6protNg+ebcyqp2FVlPx6RUAQf8= X-Google-Smtp-Source: AMsMyM56DmB6KUwGu6V1LrHlkdcQKtgAaTavDeIT/MxL6nIW2RhO7ypFl9YU4yMF+eE172/I1780C0/rmF2QyjVt+F0= X-Received: by 2002:a05:6902:152:b0:6ca:8fa:105b with SMTP id p18-20020a056902015200b006ca08fa105bmr23954752ybh.550.1666622424467; Mon, 24 Oct 2022 07:40:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?SmFuIEh1YmnEjWth?= Date: Mon, 24 Oct 2022 16:40:13 +0200 Message-ID: Subject: Re: [PATCH] [X86_64]: Enable support for next generation AMD Zen4 CPU To: Alexander Monakov Cc: "Kumar, Venkataramanan" , Jakub Jelinek , Richard Biener , "Joshi, Tejas Sanjay" , "gcc-patches@gcc.gnu.org" Content-Type: multipart/alternative; boundary="00000000000095cb1805ebc8c5c5" X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --00000000000095cb1805ebc8c5c5 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 24, 2022 at 4:26 PM Alexander Monakov 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 > --00000000000095cb1805ebc8c5c5--