From patchwork Thu Nov 3 20:47:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Reutner-Fischer X-Patchwork-Id: 59868 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 473E03858C2B for ; Thu, 3 Nov 2022 20:48:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 473E03858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667508515; bh=5HC1WQOG3bOfvcakSw/0giYZgmjhv4XZutxEU3Qk+RY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=CZtXuhr/Uc59WBrx7YCa0H/t0TmeyGxy21gs8xoWJ2CoQLpEq6BGi/72Jz9lMbzn4 MX/7mYoB78CYyXQP1LBeXahHXT1is1fbHULLgOMvjLKYd+8PzPAv3WnrQFum5AQdZa BGzVeEC/kvJlzRMboZ6Vz+9NMifP9dzOcq6uWtmk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 1BB643858D35; Thu, 3 Nov 2022 20:48:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1BB643858D35 Received: by mail-ej1-x630.google.com with SMTP id sc25so8431807ejc.12; Thu, 03 Nov 2022 13:48:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5HC1WQOG3bOfvcakSw/0giYZgmjhv4XZutxEU3Qk+RY=; b=vTRMV+WQJntWK1UQcGen3QXwp8JBW4Mic8EYL/WIvVm2+AARURvB/r1LEI7QA9WOxc yZmVc9Wom73v6C2pkotiIjODiRMWtJFwKKURZ05rDqehtZwVOVIztSICS/gr5ShmQ3gS D9qhF1OO5plNldEGjVbFOKCEyTk2ygYPe/A87j+EcKY/uOKYzCyiGurOOGLNCb2XQgPw 9fbcufokcpCzGyWWodwNjyHowRD7KtZ6hL2Vk98eU/XeDP+jeXfXibmIUcgvNOUZseEx X74UQoj4plNFsOtAD3BcH5MhSmU3cN/1h78e7CQWRzvW/tFxMnMFQITJrndTuXKD8OLc W9pg== X-Gm-Message-State: ACrzQf3AogotXhcgPK3gcbLWxHV+1tcf+JrpySSrR/vyiv4WhxQWbtAN WUAuEQrFO6p0C/UVfSdnu2E= X-Google-Smtp-Source: AMsMyM7Mw+1gabgGrKLsqKuE4j/Zlj3nQ/T3//f3I5eryYSr0UdfSdboWE8Jiv6Uh8Aaw1I23SrJUw== X-Received: by 2002:a17:906:eec1:b0:782:6384:76be with SMTP id wu1-20020a170906eec100b00782638476bemr30798727ejb.756.1667508482735; Thu, 03 Nov 2022 13:48:02 -0700 (PDT) Received: from nbbrfq ([2001:871:227:81c4:d7ff:3a0e:48da:5fe3]) by smtp.gmail.com with ESMTPSA id u2-20020a170906c40200b007add28659b0sm926724ejz.140.2022.11.03.13.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 13:48:02 -0700 (PDT) X-Google-Original-From: Bernhard Reutner-Fischer Received: from b by nbbrfq with local (Exim 4.96) (envelope-from ) id 1oqh84-002AI5-0T; Thu, 03 Nov 2022 21:48:00 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH] cgraph_node: Remove redundant section clearing Date: Thu, 3 Nov 2022 21:47:41 +0100 Message-Id: <20221103204741.516199-1-aldot@gcc.gnu.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 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: Bernhard Reutner-Fischer via Gcc-patches From: Bernhard Reutner-Fischer Reply-To: Bernhard Reutner-Fischer Cc: Bernhard Reutner-Fischer , Jan Hubicka , Bernhard Reutner-Fischer Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Ok for trunk if testing passes? gcc/ChangeLog: * cgraph.cc (cgraph_node::make_local): Remove redundant set_section. * multiple_target.cc (create_dispatcher_calls): Likewise. Signed-off-by: Bernhard Reutner-Fischer --- gcc/cgraph.cc | 1 - gcc/multiple_target.cc | 1 - 2 files changed, 2 deletions(-) diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index 8d6ed38efa2..36afa6f33f6 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -2488,15 +2488,14 @@ cgraph_node::make_local (cgraph_node *node, void *) { node->make_decl_local (); node->set_section (NULL); node->set_comdat_group (NULL); node->externally_visible = false; node->forced_by_abi = false; node->local = true; - node->set_section (NULL); node->unique_name = ((node->resolution == LDPR_PREVAILING_DEF_IRONLY || node->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP) && !flag_incremental_link); node->resolution = LDPR_PREVAILING_DEF_IRONLY; gcc_assert (node->get_availability () == AVAIL_LOCAL); } return false; diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc index 3e2d26882c8..67866a7c963 100644 --- a/gcc/multiple_target.cc +++ b/gcc/multiple_target.cc @@ -174,15 +174,14 @@ create_dispatcher_calls (struct cgraph_node *node) /* FIXME: copy of cgraph_node::make_local that should be cleaned up in next stage1. */ node->make_decl_local (); node->set_section (NULL); node->set_comdat_group (NULL); node->externally_visible = false; node->forced_by_abi = false; - node->set_section (NULL); DECL_ARTIFICIAL (node->decl) = 1; node->force_output = true; } } /* Create string with attributes separated by comma.