From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward400c.mail.yandex.net (forward400c.mail.yandex.net [178.154.239.223]) by sourceware.org (Postfix) with ESMTPS id 297593858D37 for ; Wed, 28 Dec 2022 05:37:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 297593858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tut.by Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tut.by Received: from myt6-265321db07ea.qloud-c.yandex.net (myt6-265321db07ea.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2626:0:640:2653:21db]) by forward400c.mail.yandex.net (Yandex) with ESMTP id 9D52F60820 for ; Wed, 28 Dec 2022 08:36:59 +0300 (MSK) Received: by myt6-265321db07ea.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id vaIq7P9YHa61-o4lgHuDP; Wed, 28 Dec 2022 08:36:58 +0300 X-Yandex-Fwd: 1 Authentication-Results: myt6-265321db07ea.qloud-c.yandex.net; dkim=pass Content-Type: multipart/alternative; boundary="------------ApNP4sx0VyD46AQMNwcjhCZ2" Message-ID: <387a052a-60f2-3d03-38d4-dcff21aaaa03@tut.by> Date: Wed, 28 Dec 2022 06:36:57 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: ru, en-GB To: gcc@gcc.gnu.org From: Alexander Zaitsev Subject: Document how to build PGO-optimized GCC version X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,HTML_MESSAGE,KAM_DMARC_STATUS,KAM_SHORT,NO_DNS_FOR_FROM,SPF_HELO_NONE,TXREP,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------ApNP4sx0VyD46AQMNwcjhCZ2 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello. We are using GCC for our C++ projects. Our projects are huge, commit rate is quite huge, so our CI workers are always busy (so as any other CI workers, honestly). Since we want to increase build speed, one of the option is to optimize the compiler itself. Sounds like a good case for PGO. Clang has the infrastructure for building the Clang itself with PGO: https://llvm.org/docs/HowToBuildWithPGO.html . I have tried to find something like that for GCC but with no success. My proposal is: * add support for building PGO-optimized GCC into the GCC build infrastructure * add documentation to the GCC site, how to build GCC with PGO optimizations * (if GCC community provides prebuilt gcc binaries) use PGO for the prebuilt binaries. E.g. Clang and rustc already uses this approach. Any feedback is appreciated. Thanks in advance! -- Best regards, Alexander Zaitsev --------------ApNP4sx0VyD46AQMNwcjhCZ2--