Message ID | 1ab98391f1f12962c48d1dd4d7309fc219454c96.1700222403.git.mjires@suse.cz |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp789061vqn; Fri, 17 Nov 2023 12:17:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDdQjDXKJ2kArkI94PjVCgF5pwU8TCvuld5rR9yQIo5S1c1jrMfxKrmSpnYQ8ECj/+a8qm X-Received: by 2002:a05:620a:258d:b0:774:c82:7536 with SMTP id x13-20020a05620a258d00b007740c827536mr681160qko.71.1700252240126; Fri, 17 Nov 2023 12:17:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700252240; cv=pass; d=google.com; s=arc-20160816; b=R7nilm66dp0OCpjSYkw2D+aQ4jiSf4xYTWe8PdoHZQ8Fv6OV5433q34AKiAR3gH2/x SqQH3eJV7hieVZ50ugKlN97fJ5MS5NmQPVsGplusxBEDTmyzCYOfPhUqc4gnfnkaHGCB cIS9LDbbH3u0x0txC3mWfcP1AhP4YbTA94jliDBhTPS+A7Vq+8Y7Ts7hFca0z4Nof7Ne IKDQZzNWTL8fKCJsWq9pYU2pH79pyhfMmb1JBoOFG4Jr2xmpEWzTnfwU6KfAB24ong/q PDcq9pwPsyRN69eIY1CrVDHUJXs8azo8rKsYyYeGc6HAPF0Z2EX560hOlDA1aFq2rDrR uD7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=kE0N19nzY/cS0AuyPWRvzNzDpaxfMwxOh4gT5ooCYIU=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=vdBULujV12LAkJeDhLRu7EiBGMrnvti/ykT3pRk9EnZgQ/wtbzHDwDsoZLJagpoA6m 3tBlksEoP9qREGeuThh7I5coJ+zQ2QrrEQUGwi3FTGksiiEOcFnSanKEg5WxCGgsX5bt kWlXZ6AyuUxC2Xq/2VrjvSnVhK1Eyj6+7ylzWseVzpy/yJi85/yxPfBmfMXvrTeAgWKY mFH08zC9rTOEwJiGhH+m8YQ+YKT01+SivkMIlP+oNR7iIDAhay8U9ez3SoofkJUv3cSP /tP1fdmqrbiWNciCUEq4FwCWtY30nLzq0+Qn07nwx+Zx7Z+xbu7MC/76PsHX9YfuLPxX 2g0Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=nTE13SSG; dkim=neutral (no key) header.i=@suse.cz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a27-20020a05620a16db00b00775cab41f33si2120772qkn.552.2023.11.17.12.17.20 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 12:17:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=nTE13SSG; dkim=neutral (no key) header.i=@suse.cz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1905438582A6 for <ouuuleilei@gmail.com>; Fri, 17 Nov 2023 20:17:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 11DBB3857B8A for <gcc-patches@gcc.gnu.org>; Fri, 17 Nov 2023 20:16:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11DBB3857B8A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 11DBB3857B8A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2178:6::1d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700252216; cv=none; b=C0SiLsSNow5rJzd4inDShNwEiCpdSHfHufOomyy6vxR7kkhdwbNnIwFb+ugCJVSGzQtg+0fkUzdffX9ck0aEqmVgAM2gKyvdWVTbZKXsjsST0BmU0ehB4sd4Ae97jQ3lxTCqd8yqHpPU+eK0fRfSobmv0LD+PgZKpza+DxZ3dkE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700252216; c=relaxed/simple; bh=jTltF1SKnS67wrHeAcxxoNnDy4Q7Wd5UYtcG4hFfg8s=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=p/HjXbD8nlqVMHm8KGuM3qQvdiJ41iOyupeQWVLTOYLP6PqyeTeD24o31ZEj0yeHPbjGe6z49ViwVblw0TPjj97yyKbOrlXZpkf+h3Re5K0CuDMvR9QUsCULWX6lzVoh8bmxWdq4+sQ+FvsQCvR6ovo1Tu+pCOW4EZf7Q14Tk8Y= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 031DB1F37E for <gcc-patches@gcc.gnu.org>; Fri, 17 Nov 2023 20:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1700252214; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kE0N19nzY/cS0AuyPWRvzNzDpaxfMwxOh4gT5ooCYIU=; b=nTE13SSGfB7aA4JH3kJAGHfrt8ltDJPtsujkhQoL4irr2o4ThMnzHoP7jywdoTNsUah2il 0ED9BKBe0XNCqtp19jwrtVu5CdILloBUjqr/BN0GjCAvuXohMt985TNFXCU0cUR7K8CAjA MAF0A2aiCLRA2A8nkor0DeMtv7MZu9o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1700252214; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kE0N19nzY/cS0AuyPWRvzNzDpaxfMwxOh4gT5ooCYIU=; b=n/LxS6TnIrH79AHCBSa4UJYu62ya15GmDG4TzipB5EMB3UhdupU4tQBiYj+KGSbSiMGEdD QDk+nNYUAPHi0RDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DEB541341F for <gcc-patches@gcc.gnu.org>; Fri, 17 Nov 2023 20:16:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Pt9zNDXKV2UFGgAAMHmgww (envelope-from <mjires@suse.cz>) for <gcc-patches@gcc.gnu.org>; Fri, 17 Nov 2023 20:16:53 +0000 Date: Fri, 17 Nov 2023 21:16:52 +0100 From: Michal Jires <mjires@suse.cz> To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/7] lto: Remove random_seed from section name. Message-ID: <1ab98391f1f12962c48d1dd4d7309fc219454c96.1700222403.git.mjires@suse.cz> References: <18cc1c3980551ac1881eea6e78811a629c7baa82.1700222403.git.mjires@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <18cc1c3980551ac1881eea6e78811a629c7baa82.1700222403.git.mjires@suse.cz> Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -3.27 X-Spamd-Result: default: False [-3.27 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gcc-patches@gcc.gnu.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.19)[-0.929]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.99)[99.94%] X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782843693017873047 X-GMAIL-MSGID: 1782843693017873047 |
Series |
lto: Incremental LTO.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Michal Jires
Nov. 17, 2023, 8:16 p.m. UTC
Bootstrapped/regtested on x86_64-pc-linux-gnu gcc/ChangeLog: * lto-streamer.cc (lto_get_section_name): Remove random_seed in WPA. --- gcc/lto-streamer.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Comments
> Bootstrapped/regtested on x86_64-pc-linux-gnu > > gcc/ChangeLog: > > * lto-streamer.cc (lto_get_section_name): Remove random_seed in WPA. This is also OK. (since it lacks explanation - the random suffixes are added for ld -r to work. This never happens between WPA and ltrans, so they only consume extra space and confuse the ltrans cache). > --- > gcc/lto-streamer.cc | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gcc/lto-streamer.cc b/gcc/lto-streamer.cc > index 4968fd13413..53275e32618 100644 > --- a/gcc/lto-streamer.cc > +++ b/gcc/lto-streamer.cc > @@ -132,11 +132,17 @@ lto_get_section_name (int section_type, const char *name, > doesn't confuse the reader with merged sections. > > For options don't add a ID, the option reader cannot deal with them > - and merging should be ok here. */ > + and merging should be ok here. > + > + WPA output is sent to LTRANS directly inside of lto-wrapper, so name > + uniqueness for external tools is not needed. > + Randomness would inhibit incremental LTO. */ > if (section_type == LTO_section_opts) > strcpy (post, ""); > else if (f != NULL) > sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, f->id); > + else if (flag_wpa) > + strcpy (post, ".0"); Con't post be just empty string? > else > sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false)); > char *res = concat (section_name_prefix, sep, add, post, NULL); > -- > 2.42.1 >
diff --git a/gcc/lto-streamer.cc b/gcc/lto-streamer.cc index 4968fd13413..53275e32618 100644 --- a/gcc/lto-streamer.cc +++ b/gcc/lto-streamer.cc @@ -132,11 +132,17 @@ lto_get_section_name (int section_type, const char *name, doesn't confuse the reader with merged sections. For options don't add a ID, the option reader cannot deal with them - and merging should be ok here. */ + and merging should be ok here. + + WPA output is sent to LTRANS directly inside of lto-wrapper, so name + uniqueness for external tools is not needed. + Randomness would inhibit incremental LTO. */ if (section_type == LTO_section_opts) strcpy (post, ""); else if (f != NULL) sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, f->id); + else if (flag_wpa) + strcpy (post, ".0"); else sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false)); char *res = concat (section_name_prefix, sep, add, post, NULL);