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 9A9803858D32 for ; Mon, 27 Jun 2022 21:25:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A9803858D32 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-56-M80HAk7MPOerPjGFWiVxig-1; Mon, 27 Jun 2022 17:25:33 -0400 X-MC-Unique: M80HAk7MPOerPjGFWiVxig-1 Received: by mail-qv1-f69.google.com with SMTP id u18-20020a0cf1d2000000b00470427ccfa5so10425543qvl.18 for ; Mon, 27 Jun 2022 14:25:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=dm9VrJLPWFrYXok/mlpAB0XUqru1THmqBfHndy7k7iI=; b=u1lVwEDkCS4SW3nl4MKPfRriUOC1FN3Ui3a0qDYDGOy5vvO10TphMgw1tDh+mYcIUt srcS2vibFqHxXybEWX84ljLBwTD7IrgXrdS04V22wsMcQJjLhYrIA8cma5UVEPnkAEmF x9bZl0D+yMdwLFqLsVN3xc7biiz6N3Ta2MxV9/PtchesXk/n6S7kfgw4P2Gl8l7uQObW awYZFz7Ht6a3PvP71lHubaFusJzG+VWmhdTbRPJu/I/nArKtJDoqEpsUh4nINvVW6fu3 h2aFXlFi/TnWv/P78CuyYukwqw20iljH9EeLn9pY2nHIv1HHiv2oofZdJuWJujCluMFB OpbA== X-Gm-Message-State: AJIora+sRalIrNRBMFnbA4Y1dbqu9t5sR9PmAcdlviKbvGfddmrb5qlk O2xdXEeVJz2VG1QRTa5S2VpZgvjV1Cc/CIq0wUac8Hx5IRE3kiQKZiGQ9OS4DgiMY6js8AT1snC +lY8MzW78r7vYLVGv1Q== X-Received: by 2002:a05:620a:371a:b0:6af:4ef7:714c with SMTP id de26-20020a05620a371a00b006af4ef7714cmr898118qkb.76.1656365132648; Mon, 27 Jun 2022 14:25:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZZsQ8vl3d0ze2ic+u4S3duZvATH7fvpVcSzM+OfXjiG/zbxvGbuAkR7fiUCW6hejbAAsVsg== X-Received: by 2002:a05:620a:371a:b0:6af:4ef7:714c with SMTP id de26-20020a05620a371a00b006af4ef7714cmr898101qkb.76.1656365132374; Mon, 27 Jun 2022 14:25:32 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id i10-20020a05620a404a00b006a6d4261f40sm10069332qko.111.2022.06.27.14.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 14:25:31 -0700 (PDT) Message-ID: <49c2c7d3cf241b6125151b91573636affb4bd1b3.camel@redhat.com> Subject: Re: PING^2 : Re: [PATCH 08/10] i386: add 'final' and 'override' to scalar_chain vfunc impls From: David Malcolm To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" , Jan Hubicka Date: Mon, 27 Jun 2022 17:25:30 -0400 In-Reply-To: References: <20220523192834.3785673-1-dmalcolm@redhat.com> <20220523192834.3785673-9-dmalcolm@redhat.com> User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 27 Jun 2022 21:25:36 -0000 On Fri, 2022-06-24 at 22:58 +0200, Uros Bizjak wrote: > On Fri, Jun 24, 2022 at 8:19 PM David Malcolm > wrote: > > > > I'd like to ping this patch: > >    https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595440.html > > > > OK for trunk? > > I have no idea what patch does,  Sorry for any confusion; there was a description in the cover letter to the kit, but you won't have seen that due to me CCing you to just this one. This is a C++11 feature, which helps document our intentions in those places where we're using virtual functions. We can add "final" and "override" to the decls of virtual function in derived classes, which document to both human and automated readers of the code that the decl is intended to override a virtual function in a base class. In particular, it can help catch commom mistakes where we intended to override a virtual function, but messed up the prototypes and so merely introduced a similar-looking function that never gets called. For example, G++ has a -Wsuggest-override warning (which I hope we'll eventually be able to turn on during our bootstraps). > but if all other targets do the same, > x86 shouldn't be left behind. > So, rubber-stamping OK. Thanks. As it happens, x86 is actually the only patch I've done this cleanup for - but Jeff declared this cleanup to be obvious when reviewing another patch in the kit, so I've pushed this (as r13-1309- g0a8333ade9a03f), along with the rest of the kit. Hope this makes sense Dave > > Thanks, > Uros. > > > > > Thanks > > Dave > > > > > > On Mon, 2022-06-13 at 14:30 -0400, David Malcolm wrote: > > > Ping for this patch: > > >   https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595440.html > > > > > > OK for trunk? > > > > > > Thanks > > > Dave > > > > > > On Mon, 2022-05-23 at 15:28 -0400, David Malcolm wrote: > > > > gcc/ChangeLog: > > > >         * config/i386/i386-features.h: Add "final" and "override" > > > > to > > > >         scalar_chain vfunc implementations as appropriate. > > > > > > > > Signed-off-by: David Malcolm > > > > --- > > > >  gcc/config/i386/i386-features.h | 16 ++++++++-------- > > > >  1 file changed, 8 insertions(+), 8 deletions(-) > > > > > > > > diff --git a/gcc/config/i386/i386-features.h > > > > b/gcc/config/i386/i386- > > > > features.h > > > > index 5c307607ae5..f46a6d95b74 100644 > > > > --- a/gcc/config/i386/i386-features.h > > > > +++ b/gcc/config/i386/i386-features.h > > > > @@ -169,18 +169,18 @@ class general_scalar_chain : public > > > > scalar_chain > > > >   public: > > > >    general_scalar_chain (enum machine_mode smode_, enum > > > > machine_mode > > > > vmode_); > > > >    ~general_scalar_chain (); > > > > -  int compute_convert_gain (); > > > > +  int compute_convert_gain () final override; > > > >   private: > > > >    hash_map defs_map; > > > >    bitmap insns_conv; > > > >    unsigned n_sse_to_integer; > > > >    unsigned n_integer_to_sse; > > > > -  void mark_dual_mode_def (df_ref def); > > > > -  void convert_insn (rtx_insn *insn); > > > > +  void mark_dual_mode_def (df_ref def) final override; > > > > +  void convert_insn (rtx_insn *insn) final override; > > > >    void convert_op (rtx *op, rtx_insn *insn); > > > >    void convert_reg (rtx_insn *insn, rtx dst, rtx src); > > > >    void make_vector_copies (rtx_insn *, rtx); > > > > -  void convert_registers (); > > > > +  void convert_registers () final override; > > > >    int vector_const_cost (rtx exp); > > > >  }; > > > > > > > > @@ -190,14 +190,14 @@ class timode_scalar_chain : public > > > > scalar_chain > > > >    timode_scalar_chain () : scalar_chain (TImode, V1TImode) {} > > > > > > > >    /* Convert from TImode to V1TImode is always faster.  */ > > > > -  int compute_convert_gain () { return 1; } > > > > +  int compute_convert_gain () final override { return 1; } > > > > > > > >   private: > > > > -  void mark_dual_mode_def (df_ref def); > > > > +  void mark_dual_mode_def (df_ref def) final override; > > > >    void fix_debug_reg_uses (rtx reg); > > > > -  void convert_insn (rtx_insn *insn); > > > > +  void convert_insn (rtx_insn *insn) final override; > > > >    /* We don't convert registers to difference size.  */ > > > > -  void convert_registers () {} > > > > +  void convert_registers () final override {} > > > >  }; > > > > > > > >  } // anon namespace > > > > > > > >