From patchwork Fri Nov 25 14:10:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1709078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=DUPbaDVE; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NJcGt6BlBz23nR for ; Sat, 26 Nov 2022 01:11:18 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97A3638532F4 for ; Fri, 25 Nov 2022 14:11:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97A3638532F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669385476; bh=E1dC6bvnPxF9IVfbiHzv/7u15RtHOBt92R9dj5Mb+f4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=DUPbaDVEzy4mPWaIuZRylzqiJYMtBu2jkhTXsOqZgFr7aSV12vLhAWNmnDqOtfNSK CtajlLOxLkOBEmXmHaNrjcfAuYeKqli+DwFJ/HsAWysD4zXcO3S4mo8ptwcq4d7Hwt +wMv+7bQAymSwaAzTFp9YrWKJfDrkKWQPO7wMybc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id BB69138532DA for ; Fri, 25 Nov 2022 14:10:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BB69138532DA Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 6B271284AE4; Fri, 25 Nov 2022 15:10:56 +0100 (CET) Date: Fri, 25 Nov 2022 15:10:56 +0100 To: gcc-patches@gcc.gnu.org Subject: Fix resolution streaming with incremental linking Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jan Hubicka via Gcc-patches From: Jan Hubicka Reply-To: Jan Hubicka Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, this patch fixes streaming of resolution info when flag_incremental_link == INCREMENTAL_LINK_NOLTO. Here we want to stream the info from WPA to ltrans as usual. Bootstrapped/regtested x86_64-linux, tested with kernel LTO builds. Plan to commit it later today. Honza * gcc/lto-cgraph.cc (lto_output_node): Only drop resolution info when flag_incremental_link === INCREMENTAL_LINK_LTO. diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc index 350195d86db..ff7669d0c4b 100644 --- a/gcc/lto-cgraph.cc +++ b/gcc/lto-cgraph.cc @@ -563,7 +563,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, LDPR_NUM_KNOWN, /* When doing incremental link, we will get new resolution info next time we process the file. */ - flag_incremental_link ? LDPR_UNKNOWN : node->resolution); + flag_incremental_link == INCREMENTAL_LINK_LTO ? LDPR_UNKNOWN : node->resolution); bp_pack_value (&bp, node->split_part, 1); streamer_write_bitpack (&bp); streamer_write_data_stream (ob->main_stream, section, strlen (section) + 1);