From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Q: What is default architecture for code produced by native compiler? Date: Wed, 25 Aug 2021 03:13:49 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20746"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 25 03:19:39 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIhZo-00055Z-W9 for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Aug 2021 03:19:38 +0200 Original-Received: from localhost ([::1]:51440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIhZn-000888-8V for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Aug 2021 21:19:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIhZH-0007UB-7H for emacs-devel@gnu.org; Tue, 24 Aug 2021 21:19:03 -0400 Original-Received: from mail-vi1eur06olkn2080a.outbound.protection.outlook.com ([2a01:111:f400:fe11::80a]:33761 helo=EUR06-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIhZB-0001h1-Az for emacs-devel@gnu.org; Tue, 24 Aug 2021 21:19:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZI+jeGl4DfVwLq+6tC674KKqdeq27cM2l3B/Aib5wPRUimGKjmnd33ze/yfN/xYSI4fcM8G2Ai2pfYEr2yDOCw+p8ihvf/u7j871Tfi20vzLd+9HHS09xkWsw3EVOdSvjOA0MX5uBdo/seT5vXe9tB6uaVPdvQdoxWJpnY07AO/+LmejetmvNT7qkDGSGzehMHIXm5R9y4nPOzLnW39viKx1SWgzGyZJYzv/DHNFmeNC+i6gvBJgin29D8HG6K1ZSyx2VFemwl3g1lUnfvAnZThwtWVE+vllzdqBuDRZgqpmXAwLvme52yYjzpQwoqLu3qBX9VYVQ7Kb7yf2FHTcew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SwPs9h10dQMfXSsnrf9UN12JRoDLresg4cajmPbEE/Y=; b=HqdHLnmvnNnC+u+c/El9qP6wPsefkvxbJUWOfT5D092pUt12lKsJgflDsGtEc3ssAJtNahsdz6LmIjp6P2QOERl8UDSLVnOofYCvr608Kf052iAeBpvoleovZhhgVVoRoCH2eU8d75+uVUlF1Z03PfwMe2lZRDzJRZQJA9lQGGjgp8YZv/z9kTZabFdQPtCjXYXQZT2TcKGokNKZc4f7vYmx7YQJJGhJOucbyClTuXOHVCsfCSN38WQCaYnyxBvktKiNa2GiTTMAvfFeL+yM4weorISRD2edGGM33B09nbOpt0Rl83abYBATB75WjP5DxuFqpjmTxrV+uqjFdhlLdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SwPs9h10dQMfXSsnrf9UN12JRoDLresg4cajmPbEE/Y=; b=tvBVJ3nljYc/vgFK4ZANj0aFv7Cupw2KPIYfQRNGUUGDx/oNeKSo0QfdKddOZCFk9QANzIqrf/gwoxssqTt2+0aY7sS03sTTDPrCxizKRKWQjNAnwI2rUfZENQluepOG5EJZPiBJ88HmFxdAocJTRJfpH0Y8F7wGMLAa7fmUhlpsF8+7AmKH2ouTKHwj+NNcOBNuvVZzOWFHGHmTfw6WeH9iSAMuwshL9cdsExFhEAdhba9exQmXJ/7rsPn50eN3nuFn53ihKx963nEarVgEJ2r5YJ8Ie/QYOyXfXn1mSqIhKuh+8pWZEEv7rt81CV2KemX2+iEN/mQBC4gencUX1Q== Original-Received: from DB8EUR06FT029.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::46) by DB8EUR06HT132.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::278) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19; Wed, 25 Aug 2021 01:13:51 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:fc35::4e) by DB8EUR06FT029.mail.protection.outlook.com (2a01:111:e400:fc35::318) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.17 via Frontend Transport; Wed, 25 Aug 2021 01:13:51 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:C5EEEE3F76994E3AD6C70309BF6BAE9755511CAA40B5550FE6B25DF001AF545D; UpperCasedChecksum:476FB65D5EBD32919D54481477A60860725A044943C3A191BBD51939F8C123AA; SizeAsReceived:7483; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b483:471e:6dc2:12ae]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::b483:471e:6dc2:12ae%9]) with mapi id 15.20.4436.025; Wed, 25 Aug 2021 01:13:51 +0000 In-Reply-To: (Andrea Corallo's message of "Tue, 24 Aug 2021 20:11:14 +0000") X-TMN: [pQBojLfuz4BeHWqPgE75QALrNiK2tLVH] X-ClientProxiedBy: BE0P281CA0029.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:14::16) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnoajpgy.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by BE0P281CA0029.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:14::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.6 via Frontend Transport; Wed, 25 Aug 2021 01:13:50 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5c068fd9-9a04-4272-2adf-08d96765991c X-MS-TrafficTypeDiagnostic: DB8EUR06HT132: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vwt/XfBQJLRyYKNTc8wKCipT269ERXd4FKpj5chRZa/fkXj9q54NNTyI/ro6JHtjaRunSMvGU2U7sK+e3JG0TfsVwqatRwiU7dty+3eqSbOQPqAm/AL2sXnfmpP66dko5V+5h1piplQ6NEmw8okupluQSu4Hz3YENxvddROvtMofpvFcxHdvMGVDvlNKG9VnuvBzFjoWMCcC2CUuvprHBq4ac8IIvMIaF1LRzjPU3Vvs5p96vg6qGFoBOincX2F5pVYM9XU8PkEYCrgjsoXTPvH6LXlacTMx6dMVLREbw5+ZOM+fgr14RoHjCTw55dYck7J9B8qLgKDdychMWWtQRsilNYArsogwM5EfxIlc1+Midcp6tX6BM4sXpuUIQ0VN+wHPaHxfAChwFhpZfn8jfGRRsmB8F63QDaMs2Ns3uP6ED0hEyudGXtDsu72yirxK X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZoVEVBZoCL18Hip9eyrvX1JVDMFjKop3Dzf3sKPHrIUtJkzHVgyV9vPsBW4YDMbe5dFV7NlYxsvUfOmZJTAE9wPYJVsvZsYbKfuilA+mxU1qhN731B1xSQTFquanbpyCcfN/JobqEI8HttRpgbihew== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c068fd9-9a04-4272-2adf-08d96765991c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2021 01:13:51.2642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT029.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT132 Received-SPF: pass client-ip=2a01:111:f400:fe11::80a; envelope-from=arthur.miller@live.com; helo=EUR06-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272936 Archived-At: Andrea Corallo writes: > Arthur Miller writes: > >> Just wonder, is it generic x86 or something later or does it uses >> native for architecture and cpu flags (-march=native and -mcpu=native)? > > I'd say is GCC's default. Yes, I see. The default is generic. $ echo | gcc -v -E - 2>&1 | grep cc1 /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/cc1 -E -quiet -v - -mtune=generic -march=x86-64 -dumpbase - I am not sure what "generic" cpu boils down to on intel, but I would of course prefer to generate code for my cpu (skylake) if possible. >> If it is generic, do we have option to pass in arch and cpu flags? > > No we don't, even if we could expose it using > 'gcc_jit_context_add_command_line_option' for non obsolete versions of > GCC. Allright, is there any interest to expose this? :-) We could have a defcustom in comp.el, either some boolean like: "native-comp-prefer-host-cpu" or maybe a string like: "native-comp-compiler-options" but that is maybe too wide? I don't know how resilient is native comp to various opt flags, is it very picky which are used, or anything gcc can take works? I have never looked at native branch code, so I am not sure how it works, but grep tells me that this function were fun happens is comp--compile-ctxt-to-file, would that be the only one I need to hack? To be honest, I have no idea if there is much if anything to win in speed in elisp context, between generic and skylake, but I have to try :). > Regards > > Andrea Thanks for very fast answer! best regards /a