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 B85813858D39 for ; Thu, 9 May 2024 18:59:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B85813858D39 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 B85813858D39 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=1715281166; cv=none; b=U4e1sL5O5EyNjTC/wL2dYyaHheXZwm6a0YreXwYhHzDpC30Qr8AibDfWUZg+AvrU1hOUU17Dl78iRREDUNvecclTxS8WL6Dg9Rldd3Vb40NovhapoL48j5q+RtGXxhPlElTMHPdC2R17bS818zSgo8fZSFUP8uiz9480Gimzo4M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715281166; c=relaxed/simple; bh=bu3nI9p4HTt1+onREJPMpd9JrQJgzh8vouXFtBWvKHQ=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=E28n7VsHouMyOGSYg4DlccavkrfaQWl3sojWr8mEosrct2TsdtV48dnarIA3Y+sqsYesiwX7YPnwFVDXht2y0ddfB2G/aIICTHj0SCMfl1wC0N6uOw8wJ/aXmSs/2pcBuGqO+6Odahf9S/aFFSElvn9Bf9kmO+Wcd3BmIOuVS8A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715281164; 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=02jv0ajGz+nPWKjWqoYiCGm4Q4BR3uVSZZptojCdsOA=; b=hns269li5CG9BJFuKSh6d6ZK4CXx3QggHpQlDIGClyxYIGXpfkHUTKWr+btQrUBRlbEUHu IAh9wct2eLwkudYEB5ich0z1ejDGuOLSGx1F4wPYx7/xud6L3CVZqmlYz/NWWYc7zhHWMY 5aXLDxDBcicnwOABWtTo5ssAYNlcvwc= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-rjRiuyaGMX23B_RZ3O8HOA-1; Thu, 09 May 2024 14:58:55 -0400 X-MC-Unique: rjRiuyaGMX23B_RZ3O8HOA-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-43d4c837325so9783931cf.1 for ; Thu, 09 May 2024 11:58:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715281135; x=1715885935; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=02jv0ajGz+nPWKjWqoYiCGm4Q4BR3uVSZZptojCdsOA=; b=AF0AWMKBDxWrSnkcdTCJYIdL8pInkYZe3ZfDpG5y0e0ZYmQ8SjM4bnVBPh7jCrDeIg Q2HDs/sZXt9qAJUe04QbayBrsad9YNIUMgdr4o6Lw/mD/Ow48QTmmGDYSg4KdOUOfvzK 4Aj1eDINCXeG7VxmCHUfJO6722Nipa+AN64meJ1K+gezk71PjehTFOE27MXUacljo62b irwhGHZiUnQXQf5H+/5hjG4Zvir4/P4ZOXNEJcPsE+d2KZwmlN6TAmLmp+SroEH5jxnN OFf5d4RuOhS7URCly18WKqxYXkTeH2nODhfeNvSUlt/UHuKovHvADJxsADY5nMPEeA/0 3OTQ== X-Forwarded-Encrypted: i=1; AJvYcCWpXlepF3YWUe6GDy7RjCrzFfYjzD+jewfvvOc0DfT1Vq+jMywyK5rK4WhHKEl4xMBoW717Cy+gdTGmXYaH4xqULIzzVVSvhw== X-Gm-Message-State: AOJu0YzqUD/2Kdzov02hARDwmvPj7n35JCt7n8vP4EdiEQ2UXtyOwfTb fsc7YUzG3Ldw7Gmqfch9piKYeKZVDG8wJetF6lZEEZcgFWkizWtxCfsxVII5N4tftLU5U2EQ7mF U4Q2f333R6aMouZBAZwL4cDi2O/Suw6v7TjZGekxXDhoghhGH7xdmBTA= X-Received: by 2002:ac8:7f0a:0:b0:43a:f092:c363 with SMTP id d75a77b69052e-43dfdb693fbmr3051111cf.61.1715281134972; Thu, 09 May 2024 11:58:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3zsh2aw43gNGq4NVqbaFTq1gbkVhKd5UA67aQjC9z2XoeJOTca2aNQtbhPePKFzgrHsW8Cw== X-Received: by 2002:ac8:7f0a:0:b0:43a:f092:c363 with SMTP id d75a77b69052e-43dfdb693fbmr3050881cf.61.1715281134675; Thu, 09 May 2024 11:58:54 -0700 (PDT) Received: from redhat.com ([2603:7000:9500:34a5::1db4]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43df54d6afasm11279211cf.24.2024.05.09.11.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 11:58:54 -0700 (PDT) Date: Thu, 9 May 2024 14:58:52 -0400 From: Marek Polacek To: Jakub Jelinek 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: References: <5f6569bc-8d94-434c-b66d-137c8e7f5e64@redhat.com> <32bfcf8c-1b45-444c-8729-e560952fe44b@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) 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=-6.5 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 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. Marek