From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id 6E235385BF81 for ; Wed, 8 Apr 2020 13:20:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E235385BF81 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-lLBevedLNteAkjIffyPG4w-1; Wed, 08 Apr 2020 09:20:10 -0400 X-MC-Unique: lLBevedLNteAkjIffyPG4w-1 Received: by mail-qv1-f69.google.com with SMTP id g14so4732845qvp.5 for ; Wed, 08 Apr 2020 06:20:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hG5XHnHhm3wngXH51bWP+Ex6Hs6pD11+vf3GaoOLbTA=; b=AhT2zQK2itACg+ekbqRzahWsf/6Mmq1gMP5R/ZVcsCQzqjsRC+xkZgd2gtSlR+nln5 0rP6fbr9LFLWtD13Yy0rM/YiPpNlyowJ1wgcNAyWJ0xwoRsHXXJTtTZu8Hp3m0ghRMFn P/Q7gQC6D+2ZQ4gmsFDlA1j0yXBj2VE0NWfRJyuHsrfSo7DHi7ws7rJ4ibO1XFzwfgNJ Sfj4R8vw0uVzCBmtlbZeaVbvmy4P3bVhh7BRK+7Uh7UhF4bwVHk/ICHJBgWQCEVTmEGo XmspAIiVQ87uQ6z0ZB3rw5R3vZTwluqSvgRciAJAYfLFb6f26AHhCRdM8ZXEvlB6IQDj cl4A== X-Gm-Message-State: AGi0PubBWeTywV+DvpxeZw871L4NqQA+roxHlnDEWjx3kCptxp8xtfsR B3VYkx88OATg3eV2dD2Iu1LbBCGPLgClXfkKqzzliB1aBozmjVMEBk36RBVHu0zqxGnopmvSm9E skuJLJ6uRGEdBHd8FQA== X-Received: by 2002:ac8:2224:: with SMTP id o33mr7429974qto.263.1586352009747; Wed, 08 Apr 2020 06:20:09 -0700 (PDT) X-Google-Smtp-Source: APiQypIagu5LzAjKWXNIvYVDMPL2xLnzgBJzOEuUkIj8Kch5V05eOaG3PRhZppcfbzoFn4zMBXUxMw== X-Received: by 2002:ac8:2224:: with SMTP id o33mr7429941qto.263.1586352009442; Wed, 08 Apr 2020 06:20:09 -0700 (PDT) Received: from [192.168.2.148] (209-6-216-142.s141.c3-0.smr-cbr1.sbo-smr.ma.cable.rcncustomer.com. [209.6.216.142]) by smtp.gmail.com with ESMTPSA id q7sm18697064qti.58.2020.04.08.06.20.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Apr 2020 06:20:08 -0700 (PDT) Subject: Re: [PATCH] Allow new/delete operator deletion only for replaceable. To: Richard Biener , =?UTF-8?Q?Martin_Li=c5=a1ka?= Cc: Jonathan Wakely , Nathan Sidwell , Jan Hubicka , GCC Patches , Marc Glisse References: <20200331122907.GB62067@kam.mff.cuni.cz> <65230a52-c025-a6e3-0d31-409d37e9b2c9@suse.cz> <20200403152609.GA35629@kam.mff.cuni.cz> <0dbc191e-66f7-9878-956d-96149f20f5bf@suse.cz> From: Jason Merrill Message-ID: Date: Wed, 8 Apr 2020 09:20:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-16.4 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:20:13 -0000 On 4/8/20 4:47 AM, Richard Biener wrote: > On Tue, Apr 7, 2020 at 5:01 PM Martin Li=C5=A1ka wrote: >> >> Hi. >> >> The patch allows DCE to remove only replaceable operators new and delete= . >> 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. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> 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 want > 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 solutio= n > for GCC 10. This seems fine for GCC 10, though I wonder about using an attribute for=20 DECL_REPLACEABLE_OPERATOR rather than taking a bit in all FUNCTION_DECLs=20 that will only ever be set on a small handful. For GCC 11 we probably want to make the distinction Jonathan mentions=20 between new-expressions and direct calls to operator new. Jason