From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KABiAogjr2HjgAAAgWs5BA (envelope-from ) for ; Tue, 07 Dec 2021 10:04:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aEkFOocjr2ERQgAA1q6Kng (envelope-from ) for ; Tue, 07 Dec 2021 09:04:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B47823B369 for ; Tue, 7 Dec 2021 10:04:07 +0100 (CET) Received: from localhost ([::1]:53328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muWOM-0000Gt-O5 for larch@yhetil.org; Tue, 07 Dec 2021 04:04:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muWOI-0000Gj-W7 for guix-patches@gnu.org; Tue, 07 Dec 2021 04:04:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1muWOI-0007Fs-Jt for guix-patches@gnu.org; Tue, 07 Dec 2021 04:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1muWOI-0002QU-GO for guix-patches@gnu.org; Tue, 07 Dec 2021 04:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52283] [PATCH 00/10] Tuning packages for CPU micro-architectures Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Dec 2021 09:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 52283@debbugs.gnu.org Received: via spool by 52283-submit@debbugs.gnu.org id=B52283.16388677839253 (code B ref 52283); Tue, 07 Dec 2021 09:04:02 +0000 Received: (at 52283) by debbugs.gnu.org; 7 Dec 2021 09:03:03 +0000 Received: from localhost ([127.0.0.1]:36342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muWNL-0002PA-5o for submit@debbugs.gnu.org; Tue, 07 Dec 2021 04:03:03 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:21231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1muWNI-0002Of-8X for 52283@debbugs.gnu.org; Tue, 07 Dec 2021 04:03:01 -0500 IronPort-Data: A9a23:u0omYa66pnbzmRcV8IPMSAxRtBTFchMFZxGqfqrLsXjdYENS1zxUyGMdCjrQM/jZNmH1et0lPIiw8ENXupLTytdrHVQ5pCpnJ55ogZqcVI7Bdi8cHAvLc5adFBo/hykmh2ipwPkcFhcwnT/wdOi+xZVA/fvQHOOlUrabYnoZqTJME0/NtzoywobVvaY42bBVMyvV0T/Di5W31G2Ng1aYAUpIg063ky6Didyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrtJk57hc0cARbi60Qqm0ysNHfX6xEEb/mpriP5T2Pk0MC+7jx2Ngtx21tRG85e3VB01M7bkmeIHUhAeHTsW0ahuqO6ZfCnk6aR/yGWDKRMA2c5GURtsbdYw9ut9C3xB7roXLi1LaQqM78qx3LKyQeRsi+wsKtStO5kQ0kyMZxmx4e0OGMGYBfiSo4YBhHFp3JgmIBoXXOJBARIHUfgKS0ETUrvPNK8DoQ== IronPort-HdrOrdr: A9a23:OtBvwqHIL0mYMtx5pLqECseALOsnbusQ8zAXPo5KJCC9Ffbo7fxG/c5rriMc5wxhPE3I9erqBEDEewK6yXcX2/hoAV7BZniBhILAFugL0WKh+VLd8kbFmtK1u50LT0EzMqyIMXFKyeDBiTPIduoI8Z2/3pntqufYwXt3VBprbLwI1XYaNi+rVnRZfU1lCYpRLuv+2uN34wOPQDA0YtT+JlRtZYj+juyOr574ZxsbGh4g7wGUnXeE4KP3eiL44j4uFw915N4Zn1T4rw== X-IronPort-AV: E=Sophos;i="5.87,293,1631570400"; d="scan'208";a="8965930" Received: from unknown (HELO ribbon) ([193.50.110.120]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Dec 2021 10:02:47 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20211204203447.15200-1-ludo@gnu.org> <20211204204924.15581-1-ludo@gnu.org> <87czmb1m8a.fsf_-_@gnu.org> <87zgpeqaq5.fsf_-_@gnu.org> <87lf0wst9i.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Frimaire an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 07 Dec 2021 10:02:46 +0100 In-Reply-To: <87lf0wst9i.fsf_-_@gnu.org> (Mathieu Othacehe's message of "Tue, 07 Dec 2021 09:39:53 +0100") Message-ID: <87sfv4kcsp.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638867847; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=qofB+fdbNjs6jDsHUyXsZnlDKKUpOOmvPwoXovkYk1g=; b=Jk3LOQp64GBvDuuljE4qptLaERtN2C3HIWkSonTN7Pm2quwH2AGilc6sl3O7oZGXBz2B3h XnYWAMZxVkuQHgc33o4/KnAIhtL3vE/RRtF3A1UCDG6unFK1GWEv3s6OJSUa1CZn8+9wbU BcGpGTby0PRnbuG6pmb6Mc0GYzDSfK8n9GERsvTra3FA1/J0p8ehPa29zgH3EOV0Z1QdEv INLC5WYZsfJJ2LI3pq6RQWgbq16rCl4woRIZJ5il2KuFijhXC+6jg8Uq+F3M8lrkOvlpnF yD8ykh0PqS3JqnK2KZSYgtKuLl4/wNZpPzSq2xDfHkChWhTID33S+4HewjOJFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638867847; a=rsa-sha256; cv=none; b=EfLYT40jtGA0+KQE6ePzt3oy/aTFZcl5q4MpExUShAQKV/mAIvXWquw7wOPJGSB6bDo9xw pQk4hTCvaxqjaSk3hdWMgKbHWS/2w54qSkZCCW2py87YaF5j7UOo7QvdILzpcl1kYDhBLn +arRwZGjpc14Fx0Ngi/GVW4gvk6ezR3SlmSYSqgVLI8/N03Veb05ecFlzZn8FomwENixUZ yUrWefzue8uKEAW+dmZCE155+AHqxXM+RD3tmcVQHPEkQossG3iS1VGLPLPhvoZ/0+cXO8 Kt/KmKRgCKVeALoP5gd6ffSplcvyJKhQ7HVmND844L8HB3aYn4d6zFw8Euh4dw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B47823B369 X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: cNCWLEweWVXR Hi, Mathieu Othacehe skribis: > Yes sure, I agree that this refactoring can be done later just something > that we can keep in mind. Having a look to Nix, looks like they are > also maintaining some kind of architecture list: > > https://github.com/NixOS/nixpkgs/blob/master/lib/systems/architectures.nix Interesting. The list of features might be an idealized view, compared what I=E2=80=99ve seen in GCC. I wonder how this is supposed to be used. Their compiler wrapper (build-support/cc-wrapper/default.nix) passes =E2=80=98-march=3D${targetPlatform.gcc.arch}=E2=80=99 so maybe users can so= mehow override that =E2=80=98gcc.arch=E2=80=99 attribute? Any Nix-savvy person here? It also has a nice compatibility list: --8<---------------cut here---------------start------------->8--- # older compilers (for example bootstrap's GCC 5) fail with -march=3Dtoo-= modern-cpu isGccArchSupported =3D arch: if isGNU then { # Intel skylake =3D versionAtLeast ccVersion "6.0"; skylake-avx512 =3D versionAtLeast ccVersion "6.0"; cannonlake =3D versionAtLeast ccVersion "8.0"; icelake-client =3D versionAtLeast ccVersion "8.0"; icelake-server =3D versionAtLeast ccVersion "8.0"; cascadelake =3D versionAtLeast ccVersion "9.0"; cooperlake =3D versionAtLeast ccVersion "10.0"; tigerlake =3D versionAtLeast ccVersion "10.0"; knm =3D versionAtLeast ccVersion "8.0"; # AMD znver1 =3D versionAtLeast ccVersion "6.0"; znver2 =3D versionAtLeast ccVersion "9.0"; znver3 =3D versionAtLeast ccVersion "11.0"; }.${arch} or true else if isClang then { # Intel cannonlake =3D versionAtLeast ccVersion "5.0"; icelake-client =3D versionAtLeast ccVersion "7.0"; icelake-server =3D versionAtLeast ccVersion "7.0"; knm =3D versionAtLeast ccVersion "7.0"; # AMD znver1 =3D versionAtLeast ccVersion "4.0"; znver2 =3D versionAtLeast ccVersion "9.0"; }.${arch} or true else false; --8<---------------cut here---------------end--------------->8--- The compiler wrapper in this patch series doesn=E2=80=99t know what compiler it=E2=80=99s wrapping (it=E2=80=99s just calling the next one in $PATH), so= it can=E2=80=99t really do this sort of things. We could do it differently but I liked the simplicity of just dropping the wrapper in front of $PATH. Thanks, Ludo=E2=80=99.