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: 15185 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ee07:0:0:0:0:0 with SMTP id y7csp15582wrn; Thu, 3 Nov 2022 13:48:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49SHhQWNZDcFnoUaSGnNgCMtWSrBYa3B4J1TzadCn6ZXCXlEWJCa+5Yd0SzM//AAXKOl/+ X-Received: by 2002:a17:907:2e0b:b0:7a5:fc2e:dc7 with SMTP id ig11-20020a1709072e0b00b007a5fc2e0dc7mr29603558ejc.257.1667508531572; Thu, 03 Nov 2022 13:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667508531; cv=none; d=google.com; s=arc-20160816; b=x7mBAYaljctVkhOhju1UlV6RWJspvJE2I0kamwRL/nW7K+AqilLFTlaX/Htec+H4ck OuRebehXN2RNQS3Yf3h9Li+6QvmMuBZXHI1fk6lQ85XY0RQ8o2gnoj50o2aytmvpjCPO C9eQ8ibXAw/eW1PBBKCT3TPFQ9lQiUx/mc7hAO/QtuuTM4aL9NFuypgnOWBsKNOEH5UJ zGo+YGKogKOfmtvGCznbSZhaicYtsHFUNC0QhNjQUwoML0K2FIzkHHfkvKu1dQwAxbL1 61P0thpT+7ZtX6rwfNID5N/IytcKqTYiRYqNMhlgPMdWGBDqcLHFtp/oUFJfPnndVjDd lifg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=5HC1WQOG3bOfvcakSw/0giYZgmjhv4XZutxEU3Qk+RY=; b=PHO7Kgb5MRIPkaUN0eohl4aAhE65gTyLp+o/TdmkCeq1v56yhlCFmYPJBE3EsZkjQO lJi7wgaBL7ictm5LccRXOUDDwONjWmjaHJq7dgP5C52gc2yz1gTdYkqdR+wjgphHe9U5 znU3SWqk75zgyut+ciANk2qnWF+RLChEQh4t6nvWbO31t2X0nEkM5FwduxJj97lOm2BB MSrVr7eJNI1QLOAI6ExkqcdtZMA2tENWFXz9BHHYWWtGDjFwKH8L9q9vnbfk5YueTMKU OfQtBiChSf3+zIEtKKSPn+6TPk3Sm0KwqoZPL7zX+spTL5PJhZIXyE4PTLfLzXgQ/qRA CBNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yrApI9OY; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id sg38-20020a170907a42600b00741c0bd7061si2524987ejc.644.2022.11.03.13.48.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 13:48:51 -0700 (PDT) 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=@gcc.gnu.org header.s=default header.b=yrApI9OY; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F49B3858437 for ; Thu, 3 Nov 2022 20:48:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F49B3858437 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667508530; 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=yrApI9OYYKVWKQ5sGusRMHQJZl09oRkFtqLHU3iZxoYyAcbb49O2rQrJIikG6eWM9 BR0L1fvF32LDxUbzzwwJzgvN3uQDivju0b/e8ksDqC2rSOYQKwD2WfdNDmhWAIlXYZ OGfbaqW84BpIWTNSga6WlNb3FT0p4zbavatOeCvo= 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-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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748509425720286825?= X-GMAIL-MSGID: =?utf-8?q?1748509425720286825?= 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.