From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout2.netcologne.de (cc-smtpout2.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:2]) by sourceware.org (Postfix) with ESMTPS id AD7A43858D20; Thu, 28 Sep 2023 05:33:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD7A43858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=netcologne.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=netcologne.de Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 343B81260D; Thu, 28 Sep 2023 07:33:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1695879191; bh=oi6WpPPt6d3SupAuRYHD6FkEiGd7XTi00DRVPhFsSn4=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:From; b=J63tsXCk0VLIrf3ZYCghgqpJg+cegEM1FaYv1DBdL3QNv6dlaXnydNt7KIjljyj0T /A973U+195N/YP9ZOSHvrzWa/YYV7saygEBqEUvaZiWij/emQpmDbPPnIJmIEBvZfw mxgyDY9h6HfjF2JP6Xc112c09xAslv3NR1HIRXH+WvkVgLOGgKqEfdHrZSSOa+JoV5 o7Na2SIJkrS0Cm5KRDcXn2MeXtofZwpc77qaL2c9hkttpfMoP4KQcZG+DnZOZEu5X/ dEdGVNjmKrqKQvAmN1HtfSDVdw0XoZsF9KlWcjxbhsEpZg5qw7O6HDvmn1fujMziFW oM5xjeLX4Q52g== Received: from [IPV6:2001:4dd7:5334:0:cc53:3c55:f1fd:15d3] (2001-4dd7-5334-0-cc53-3c55-f1fd-15d3.ipv6dyn.netcologne.de [IPv6:2001:4dd7:5334:0:cc53:3c55:f1fd:15d3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA id AC43211D83; Thu, 28 Sep 2023 07:33:08 +0200 (CEST) Message-ID: Date: Thu, 28 Sep 2023 07:33:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Test with an lto-build of libgfortran. Content-Language: en-US, de-DE To: Toon Moene , gcc mailing list Cc: gfortran References: <9e347fa4-1940-46c6-a5c9-899cf5a7ae85@moene.org> From: Thomas Koenig In-Reply-To: <9e347fa4-1940-46c6-a5c9-899cf5a7ae85@moene.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-NetCologne-Spam: L X-Rspamd-Action: no action X-Rspamd-Queue-Id: AC43211D83 X-Spamd-Bar: - X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,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: Hi Toon, > During the GNU Tools Cauldron we discussed (at the BoF: IPA & LTO) the > possibility (and hazards) of building the run time libraries for various > compilers with -flto, enabling an -flto -static linking of programs with > the run time library available during link time optimizations. This would be a big win for libgfortran, especially the array functions, knowing that stride==1 can be a _big_ win for optimization. This is why LTO is such an excellent idea for Fortran in general, and for the library in particular. There is a PR on this with quite some discussion already, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278 . I've put you in CC of that bug, maybe we can discuss there more in detail. One point about the array functions: In the library, we use sort of a ripple carry algorithm to step through the arrays. This saves space an is general, but the performance (esp for the most common one-and two-dimensional arrays) can suffer. [...] > The full question of "lto-ing" run time libraries is more complicated > than just "whether it works" as those who attended the BoF will recall. I didn't attend the Cauldron (but that discussion would have been very interesting). I think for libgfortran, a first step would be additional work to get declarations on both sides to agree (which is worth doing anyway). Best regards Thomas