From patchwork Wed Jan 18 03:13:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6ZKf5bGF5ZOy?= X-Patchwork-Id: 1727918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NxW6w4zyQz23gM for ; Wed, 18 Jan 2023 14:13:28 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4079D3858412 for ; Wed, 18 Jan 2023 03:13:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) by sourceware.org (Postfix) with ESMTPS id B9C243858D28 for ; Wed, 18 Jan 2023 03:13:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9C243858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp70t1674011588tl53yg1y Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 18 Jan 2023 11:13:07 +0800 (CST) X-QQ-SSF: 01400000000000E0L000000A0000000 X-QQ-FEAT: AVwGxPGvfUdEqmsy7itd23HYtc44jqWlrRVWoImnnEgStlJxB/DszPb+JkycG xVW9NgFinxTW2RqJ3l68A9G+9AZxf8czV6HSJELbZAeyqB/tG+u/W3F4UlZjmqXKVR7rQoT NdglMC6SRpmgQSzw2X5d/PSoYPhDF2hiYPa5rNZWxRsRf6sZJUVFnqdoppkDyhNkc8Y3lJI Pmz2/kbbBwbTWNnQEGOMQe/4KDXidNbQOFnpGwvRQ0stD+VnOnc4TrFdRKv6+VK2LSzY1Z2 HXE9T2+iCKTAD0T+/q1OjJOVqmLevh4ee273bPsrk49sZLxP0G4PZPmauFy7SgtKgwYHSi2 qKjp7BukXCNJ23+JkpB4AYMNfTbDJGZi4M4D0q0F+0+MLJAiSWc4po8pWfiNzyDU4NhS6TG X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, Ju-Zhe Zhong Subject: [PATCH] RISC-V: Refine function args of some functions. Date: Wed, 18 Jan 2023 11:13:05 +0800 Message-Id: <20230118031305.69740-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP 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: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Refine function args. (emit_vsetvl_insn): Ditto. --- gcc/config/riscv/riscv-vsetvl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index 728a32dacd6..e11751f00af 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -580,7 +580,7 @@ has_vector_insn (function *fn) /* Emit vsetvl instruction. */ static rtx -gen_vsetvl_pat (enum vsetvl_type insn_type, vl_vtype_info info, rtx vl) +gen_vsetvl_pat (enum vsetvl_type insn_type, const vl_vtype_info &info, rtx vl) { rtx avl = info.get_avl (); rtx sew = gen_int_mode (info.get_sew (), Pmode); @@ -600,7 +600,7 @@ gen_vsetvl_pat (enum vsetvl_type insn_type, vl_vtype_info info, rtx vl) } static rtx -gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info info) +gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info &info) { rtx new_pat; if (vsetvl_insn_p (rinsn) || vlmax_avl_p (info.get_avl ())) @@ -617,7 +617,7 @@ gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info info) static void emit_vsetvl_insn (enum vsetvl_type insn_type, enum emit_type emit_type, - vl_vtype_info info, rtx vl, rtx_insn *rinsn) + const vl_vtype_info &info, rtx vl, rtx_insn *rinsn) { rtx pat = gen_vsetvl_pat (insn_type, info, vl); if (dump_file)