From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41615: [feature/native-comp] Dump prettier C code. Date: Sun, 31 May 2020 15:48:15 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="119723"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 41615@debbugs.gnu.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 31 17:49:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jfQD2-000V28-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 17:49:12 +0200 Original-Received: from localhost ([::1]:39014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfQD1-0005Cb-C7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 May 2020 11:49:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfQCt-0005C0-3p for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfQCs-0005HU-Qd for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfQCs-0006fj-Pv for bug-gnu-emacs@gnu.org; Sun, 31 May 2020 11:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 May 2020 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41615 X-GNU-PR-Package: emacs Original-Received: via spool by 41615-submit@debbugs.gnu.org id=B41615.159094010125579 (code B ref 41615); Sun, 31 May 2020 15:49:02 +0000 Original-Received: (at 41615) by debbugs.gnu.org; 31 May 2020 15:48:21 +0000 Original-Received: from localhost ([127.0.0.1]:33639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfQCC-0006eT-QR for submit@debbugs.gnu.org; Sun, 31 May 2020 11:48:21 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:59566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfQC9-0006eJ-Gk for 41615@debbugs.gnu.org; Sun, 31 May 2020 11:48:20 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04VFmFB9000045 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sun, 31 May 2020 15:48:16 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04VFmFaU006026; Sun, 31 May 2020 15:48:15 GMT In-Reply-To: (Andrea Corallo's message of "Sun, 31 May 2020 11:37:50 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181294 Archived-At: Andrea Corallo writes: > Nicolas B=C3=A9rtolo writes: > >> I have reformatted the patches. >> >> Sorry for the inconveniences. >> >> >> From 0720ec7eb3dc552b018273cd68a5f7d6bb2fdb72 Mon Sep 17 00:00:00 2001 >> From: =3D?UTF-8?q?Nicol=3DC3=3DA1s=3D20B=3DC3=3DA9rtolo?=3D >> Date: Wed, 20 May 2020 00:34:32 -0300 >> Subject: [PATCH 1/2] Define static data using string literals. >> >> The purpose of this change is to dump prettier C files. >> This does not affect compilation times in my tests. >> >> * src/comp.c (emit_static_object): Define static objects using string >> literals, memcpy and bzero. >> --- >> src/comp.c | 295 +++++++++++++++++++++++++++++++++++++++++++++++++---- >> 1 file changed, 277 insertions(+), 18 deletions(-) > > I like this considerably less :) > > It introduces quite some complexity and the same advantage in > debuggability can be achieved with something like the attached 8 line > patch (untested). > > Generally speaking I want to try to keep our back-end as simple as we > manage to. > > On the subject of 'emit_static_object' the current situation is not > ideal. But rather that working around the workaround I believe the right > thing to do is to improve GCC with a new entry point and keep the > current arrangement as a simple fallback. > > I've already an half cooked GCC patch to allow for directly injecting > blobs, this should have more then one advantage. Hopefully I manage to > start testing it today, I'm rather curious. > > Andrea Interesting news I've boostraped the Emacs with my GCC with blob support and measured an embarrassing low overall compile time. Then I questioned my-self "why is Nico not seeing any compile time benefit from his patch?" So I boostraped "Define static data using string literals" measuring a considerable improvement too. Is not as good as the one with specific GCC blob support but still very beneficial. Are you sure you do not see improvements in compile-time when this is applied? If is not the case maybe your memcpy is inlined and unrolled, but is quite strange that I do not see it here. Andrea --=20 akrl@sdf.org