From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id E91173858407; Fri, 4 Nov 2022 11:55:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E91173858407 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 1489E284A8C; Fri, 4 Nov 2022 12:55:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1667562955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2YH7AYHOoWw+8xkichDhjOWrzOOrzAKvvOUB7FSRsz4=; b=rtycChEbyrpNnMO76CHo9uVTucWnCG94GJAt5VLjKtvxleqi4Jwaj5hB6xrN0VoH0vfV9O uTca9HfPbMN1fpFr4j7rRUY4DZ/0XQzvrJZ03FE4hpZKQt/rV5hWPKE7NLY1lroCtNNLz8 0QFavMF4j7bYUym7zPBYJqhEWzzaMf8= Date: Fri, 4 Nov 2022 12:55:55 +0100 From: Jan Hubicka To: Bernhard Reutner-Fischer Cc: gcc-patches@gcc.gnu.org, Bernhard Reutner-Fischer Subject: Re: [PATCH] cgraph_node: Remove redundant section clearing Message-ID: References: <20221103204741.516199-1-aldot@gcc.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221103204741.516199-1-aldot@gcc.gnu.org> X-Spam-Status: No, score=-10.8 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 List-Id: > 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. OK (not sure how this slipped in) The code in create_dispatcher_calls is clearly cut&past of make_local. I wonder if we should clean up the FIXME :) thanks! Honza > > 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. > -- > 2.38.1 >