From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D965E3858D39 for ; Thu, 9 May 2024 19:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D965E3858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D965E3858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715281517; cv=none; b=GYH7bdCAiKFLvgfgLL8cQb6ghEOvs5lg4lMeBVqEeaLzCiN5Q4TPlKE4ZViBpkeKGfpuWEj712stU2tZjlZlqQOzz9wgeedO+03BL9kCbqa86yQe+YnLeJC+k991I7PUsviL7AM9w2A5y+mWzOAqAXhDQUR1Pzlj7pnNLhACkL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715281517; c=relaxed/simple; bh=xTapt32Mh56Xn+DRgg3K3G4tg4Gznn4XCpf62zg3ZuA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=vkPiYmstNTdvZ3L+VvytEqcUckpdIcfTTuamz1rVhIUwqx9JtPhlXY0HuZjkRgcDu2AQOWEb/SMbq6qDGl4jxUa4h3xae4XYWT3skzPTFrOEE1s7ZI+Ttp9c+dTTmhTga1rXV9nyVNstsy/5MV0OtoR3QMG/2vzgo145YAycWOU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715281515; h=from:from:reply-to: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=EBGg0ktmvE/G/Qh/cnovXEQa9Lbk4VeHetAwUXpRo/A=; b=Gxg6CTWqRtrqQoSDuwN1JX6pmx3sPWl94JD5Lmt8YT+utDVwGUS6xgfpm+rQVx7ALrNarI T+kzkn4RZi4eZ1JRzO3IJZMVPJamrp5JtljzQRp+d8W3mbxXIhYhqkIn44epIczlux9MAd Ikc/CDGBeOWUXfIfcT2ulhBk016UU1I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-IIPpRqlNN9SKE2rIO5Nj3A-1; Thu, 09 May 2024 15:05:14 -0400 X-MC-Unique: IIPpRqlNN9SKE2rIO5Nj3A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 17F5D101A525; Thu, 9 May 2024 19:05:14 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD8A510AC40F; Thu, 9 May 2024 19:05:13 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 449J5Bc6506512 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 9 May 2024 21:05:11 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 449J5Afm506511; Thu, 9 May 2024 21:05:10 +0200 Date: Thu, 9 May 2024 21:05:10 +0200 From: Jakub Jelinek To: Marek Polacek Cc: Jason Merrill , Jonathan Wakely , Jan Hubicka , gcc-patches@gcc.gnu.org, Richard Biener , Patrick Palka Subject: Re: [PATCH] c++: Optimize in maybe_clone_body aliases even when not at_eof [PR113208] Message-ID: Reply-To: Jakub Jelinek References: <5f6569bc-8d94-434c-b66d-137c8e7f5e64@redhat.com> <32bfcf8c-1b45-444c-8729-e560952fe44b@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,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: On Thu, May 09, 2024 at 02:58:52PM -0400, Marek Polacek wrote: > On Thu, May 09, 2024 at 08:20:00PM +0200, Jakub Jelinek wrote: > > --- gcc/cp/decl.cc.jj 2024-05-09 10:30:54.804505130 +0200 > > +++ gcc/cp/decl.cc 2024-05-09 17:07:08.400110018 +0200 > > @@ -19280,6 +19280,14 @@ cxx_comdat_group (tree decl) > > else > > break; > > } > > + /* If a ctor/dtor has already set the comdat group by > > + maybe_clone_body, don't override it. */ > > + if (SUPPORTS_ONE_ONLY > > + && TREE_CODE (decl) == FUNCTION_DECL > > + && DECL_CLONED_FUNCTION_P (decl) > > + && SUPPORTS_ONE_ONLY) > > + if (tree comdat = DECL_COMDAT_GROUP (decl)) > > + return comdat; > > This checks SUPPORTS_ONE_ONLY twice. Oops, you're right, fixed in my copy. Jakub