From patchwork Fri Dec 10 12:56:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 48781 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E60BF3857C4E for ; Fri, 10 Dec 2021 12:56:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E60BF3857C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1639141010; bh=+m+EAVBdyTQZdvEvrSKxoQ4o8fBfL7NNHzL3F98Fcho=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FaShUe6vHo+Y4Rkm2z1KOFUXcayhgeLYmwAZ4jUXraOOyH0aly3k2NKB1rUdvAaSv hNFgyGPYrTupetd1XYdBiOS+eWXL2s/2l3HUF3XNDcmA92QPElZpx9CaHpLmpxdzoJ bGMdD+1atjKmdN0XS97YHVYXEso17a+m4vHbqKQw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 445703858D35 for ; Fri, 10 Dec 2021 12:56:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 445703858D35 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-64-MyCPzV-aNciy7FDiW_HCKQ-1; Fri, 10 Dec 2021 07:56:17 -0500 X-MC-Unique: MyCPzV-aNciy7FDiW_HCKQ-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id F138D107B107; Fri, 10 Dec 2021 12:56:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 86A9017DBA; Fri, 10 Dec 2021 12:56:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 1BACuDSd3299060 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 10 Dec 2021 13:56:14 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 1BACuDVw3299059; Fri, 10 Dec 2021 13:56:13 +0100 Date: Fri, 10 Dec 2021 13:56:13 +0100 To: Jeff Law Subject: [PATCH] pch: Small cleanup Message-ID: <20211210125613.GO2646553@tucnak> References: <20211207095507.GV2646553@tucnak> <20211207145007.GX2646553@tucnak> <20211209145940.GI2646553@tucnak> <20211209165954.GJ2646553@tucnak> MIME-Version: 1.0 In-Reply-To: <20211209165954.GJ2646553@tucnak> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" On Thu, Dec 09, 2021 at 05:59:54PM +0100, Jakub Jelinek via Gcc-patches wrote: > > /tmp/6140018_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/config/aarch64/aarch64-sve-builtins.cc:3920:0: > > ./gt-aarch64-sve-builtins.h: In function 'void > > gt_pch_p_19registered_function(void*, void*, gt_pointer_operator, void*)': > > ./gt-aarch64-sve-builtins.h:86:44: error: no matching function for call to > > 'gt_pch_nx(aarch64_sve::function_instance*, void (*&)(void*, void*, void*), > > void*&)' > > gt_pch_nx (&((*x).instance), op, cookie); > > Fixed thusly, compile tested on x86_64-linux, committed to trunk. Here is a small cleanup. IMHO we should use gt_pointer_operator instead of specifying manually void (*) (void *, void *) or void (*) (void *, void *, void *) so that next time we want to change it, we don't have to trace all the spots. I was afraid it wouldn't work due to header dependencies, but it works well. gengtype generated files also use gt_pointer_operator. Ok for trunk (tested on x86_64-linux and cross to aarch64-linux)? 2021-12-10 Jakub Jelinek * machmode.h (gt_pch_nx): Use gt_pointer_operator as type of second argument instead of equivalent void (*) (void *, void *, void *). * poly-int.h (gt_pch_nx): Likewise. * wide-int.h (gt_pch_nx): Likewise. * config/aarch64/aarch64-sve-builtins.cc (gt_pch_nx): Likewise. Jakub --- gcc/machmode.h.jj 2021-12-09 15:40:06.145023853 +0100 +++ gcc/machmode.h 2021-12-10 13:40:47.858430024 +0100 @@ -1199,7 +1199,7 @@ gt_pch_nx (pod_mode *) template void -gt_pch_nx (pod_mode *, void (*) (void *, void *, void *), void *) +gt_pch_nx (pod_mode *, gt_pointer_operator, void *) { } --- gcc/poly-int.h.jj 2021-12-09 15:40:06.159023652 +0100 +++ gcc/poly-int.h 2021-12-10 13:41:05.476178926 +0100 @@ -2717,7 +2717,7 @@ gt_pch_nx (poly_int_pod *) template void -gt_pch_nx (poly_int_pod *, void (*) (void *, void *, void *), void *) +gt_pch_nx (poly_int_pod *, gt_pointer_operator, void *) { } --- gcc/wide-int.h.jj 2021-12-09 15:40:06.218022803 +0100 +++ gcc/wide-int.h 2021-12-10 13:41:35.405752355 +0100 @@ -3338,7 +3338,7 @@ gt_pch_nx (generic_wide_int *) template void -gt_pch_nx (generic_wide_int *, void (*) (void *, void *, void *), void *) +gt_pch_nx (generic_wide_int *, gt_pointer_operator, void *) { } @@ -3356,7 +3356,7 @@ gt_pch_nx (trailing_wide_ints *) template void -gt_pch_nx (trailing_wide_ints *, void (*) (void *, void *, void *), void *) +gt_pch_nx (trailing_wide_ints *, gt_pointer_operator, void *) { } --- gcc/config/aarch64/aarch64-sve-builtins.cc.jj 2021-12-09 17:56:53.445371821 +0100 +++ gcc/config/aarch64/aarch64-sve-builtins.cc 2021-12-10 13:42:03.112357466 +0100 @@ -3913,7 +3913,7 @@ gt_pch_nx (function_instance *) } inline void -gt_pch_nx (function_instance *, void (*) (void *, void *, void *), void *) +gt_pch_nx (function_instance *, gt_pointer_operator, void *) { }