From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39401 invoked by alias); 15 Aug 2019 11:24:51 -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 39325 invoked by uid 89); 15 Aug 2019 11:24:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-lj1-f194.google.com Received: from mail-lj1-f194.google.com (HELO mail-lj1-f194.google.com) (209.85.208.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Aug 2019 11:24:48 +0000 Received: by mail-lj1-f194.google.com with SMTP id m24so1912119ljg.8 for ; Thu, 15 Aug 2019 04:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cH78zZvTI9sOQ2C8ZymuO2TMaC4Sb/GVQ++z6s+vByE=; b=HxluhkQzhfbQjYHwT6hiygwpcPa8RT3LfhY+MJU04WuoZyBTvsgYopMTv0RTgwkQHk BC60xN4l7hGZ/9vRGacZgjAYU0uebdnhOg71FtDAciufu8IppVxOqzGy/WJSW+aq215x AAimYC1JKVv6k0r4h/2MkYkF2tP7fDg8SrNAqLPgzJH/maXvXvnGrActAFMHHZhUsMs5 Svc4kYT2YDRnNPiUWXS2R8NvCb1UAZlbF6k0Di+5qQwrhDIFeAo/RhBzY+IcxyGzJSla 6qoe5bfH1oB2MS98UqeNS97KBisJk/tcbHgUDZuWFAKq0RgEaHdQ0xQ0Sjup/icp8Hr7 2OeQ== MIME-Version: 1.0 References: <4dcdd0cb-dc8d-73f4-75a2-8ad1e91731fc@suse.cz> <20190807105104.GE2726@tucnak> <82b5b9f8-8d8a-6c30-fd63-be1a83f00798@suse.cz> In-Reply-To: From: Richard Biener Date: Thu, 15 Aug 2019 11:35:00 -0000 Message-ID: Subject: Re: [PATCH] Handle new operators with no arguments in DCE. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: Jakub Jelinek , Marc Glisse , "H.J. Lu" , David Malcolm , GCC Patches , dominik.infuehr@theobroma-systems.com, Jan Hubicka , Martin Jambor Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg01087.txt.bz2 On Thu, Aug 15, 2019 at 12:47 PM Martin Li=C5=A1ka wrote: > > PING^1 OK > On 8/8/19 10:43 AM, Martin Li=C5=A1ka wrote: > > On 8/7/19 4:12 PM, Richard Biener wrote: > >> On Wed, Aug 7, 2019 at 2:04 PM Martin Li=C5=A1ka wrot= e: > >>> > >>> On 8/7/19 12:51 PM, Jakub Jelinek wrote: > >>>> On Wed, Aug 07, 2019 at 12:44:28PM +0200, Martin Li=C5=A1ka 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, a= s 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 tes= ts. > >>>> > >>>> 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) =3D NONE; > >>> > >>> Well, how are lambdas involved in the new/delete DCE here? Lambdas wi= th removed > >>> arguments should not interfere here. > >> > >> But for coverage where we do > >> > >> gcov_write_unsigned (DECL_ARTIFICIAL (current_function_decl) > >> && !DECL_FUNCTION_VERSIONED (current_function_d= ecl) > >> && !DECL_LAMBDA_FUNCTION_P (current_function_de= cl)); > >> > >> all clones should be considered artificial? > > > > Well, from coverage perspective most of them are fine. > > > >> > >> Anyway, your patch is OK, we can think about lambdas separately. Can = you > >> simplify the DCE code after the patch? > > > > I installed the patch and I'm sending the follow up cleanup. > > > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > > > Ready to be installed? > > Thanks, > > Martin > > > >> > >> Thanks, > >> Richard. > >> > >>>> instead? On the other side, if the cloning doesn't change arguments= in any > >>>> way, do we still want to clear those flags? > >>> > >>> Well, I would consider it safer to drop it always. > >>> > >>> Martin > >>> > >>>> > >>>> Jakub > >>>> > >>> > > >