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: 61106 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2595138532EB for ; Fri, 25 Nov 2022 14:11:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2595138532EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669385485; 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=M15+E/BshTWg3pOXs0KJGKPBL0Yyak91hOGBFcwUInJe6PonrezTPckTG2tbpcO+S KHnzLXJAuZUjyq8rCssmcQ8aVrJp3LqMBVn8thvsVCbht9sCWAH/hEI3clpogNxL9j N0PlqAjEA7NzhGuNJb4rHZgX/II0YJaNWMMWGw4M= 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+patchwork=sourceware.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);