From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8708 invoked by alias); 7 Aug 2019 10:51:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8696 invoked by uid 89); 7 Aug 2019 10:51:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Aug 2019 10:51:13 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53ACF3CBC3; Wed, 7 Aug 2019 10:51:11 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-200.ams2.redhat.com [10.36.116.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C6ED5D9E1; Wed, 7 Aug 2019 10:51:10 +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 x77Ap7r4003538; Wed, 7 Aug 2019 12:51:08 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x77Ap499003537; Wed, 7 Aug 2019 12:51:04 +0200 Date: Wed, 07 Aug 2019 11:51:00 -0000 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: Richard Biener , Marc Glisse , "H.J. Lu" , David Malcolm , GCC Patches , dominik.infuehr@theobroma-systems.com, Jan Hubicka , Martin Jambor Subject: Re: [PATCH] Handle new operators with no arguments in DCE. Message-ID: <20190807105104.GE2726@tucnak> Reply-To: Jakub Jelinek References: <4dcdd0cb-dc8d-73f4-75a2-8ad1e91731fc@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00447.txt.bz2 On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Liška wrote: > On 8/7/19 11:51 AM, Richard Biener wrote: > > I think the simplest way to achieve this is to not copy, aka clear, > > DECL_IS_OPERATOR_* when cloning and removing arguments > > (cloning for a constant align argument should be OK for example, as is > > for a constant address). Or simply always when cloning. > > Ok, then I'm suggesting following tested patch. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. What about LAMBDA_FUNCTION, doesn't cloning which changes arguments in any way invalidate that too, i.e. shouldn't it be just FUNCTION_DECL_DECL_TYPE (new_node->decl) = NONE; instead? On the other side, if the cloning doesn't change arguments in any way, do we still want to clear those flags? Jakub