From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 9DC18385BF81 for ; Wed, 8 Apr 2020 13:33:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9DC18385BF81 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-355-k0J2EQmENMyRL6WmDU8HPA-1; Wed, 08 Apr 2020 09:33:02 -0400 X-MC-Unique: k0J2EQmENMyRL6WmDU8HPA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDEE01005509; Wed, 8 Apr 2020 13:33:00 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E39D85E010; Wed, 8 Apr 2020 13:32:59 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 038DWteN006060; Wed, 8 Apr 2020 15:32:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 038DWrfh006059; Wed, 8 Apr 2020 15:32:53 +0200 Date: Wed, 8 Apr 2020 15:32:52 +0200 From: Jakub Jelinek To: Jason Merrill Cc: Richard Biener , Martin =?utf-8?B?TGnFoWth?= , Marc Glisse , Jonathan Wakely , GCC Patches , Nathan Sidwell , Jan Hubicka Subject: Re: [PATCH] Allow new/delete operator deletion only for replaceable. Message-ID: <20200408133252.GG2212@tucnak> Reply-To: Jakub Jelinek References: <20200403152609.GA35629@kam.mff.cuni.cz> <0dbc191e-66f7-9878-956d-96149f20f5bf@suse.cz> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Wed, 08 Apr 2020 13:33:07 -0000 On Wed, Apr 08, 2020 at 09:20:07AM -0400, Jason Merrill via Gcc-patches wro= te: > On 4/8/20 4:47 AM, Richard Biener wrote: > > On Tue, Apr 7, 2020 at 5:01 PM Martin Li=C5=A1ka wrote= : > > >=20 > > > Hi. > > >=20 > > > The patch allows DCE to remove only replaceable operators new and del= ete. > > > That's achieved by proper mark up of all these operators in C++ FE. > > > The patch also brings all tests we've collected so far for the PR. > > >=20 > > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests= . > > >=20 > > > Ready to be installed? > >=20 > > Grepping for uses of DECL_IS_OPERATOR_* reveals you miss comparing > > the new flag in ipa-icf.c and cgraph node dumping in cgraph.c might wan= t > > to dump it as well. > >=20 > > Otherwise it looks reasonable. > >=20 > > So the mid-end parts are OK in case FE people are happy with this solut= ion > > for GCC 10. >=20 > This seems fine for GCC 10, though I wonder about using an attribute for > DECL_REPLACEABLE_OPERATOR rather than taking a bit in all FUNCTION_DECLs > that will only ever be set on a small handful. If it is just for GCC 10 and we'll return the bit back to unused in GCC 11, I'd think it is acceptable. > For GCC 11 we probably want to make the distinction Jonathan mentions > between new-expressions and direct calls to operator new. Yeah. =09Jakub