From patchwork Mon Oct 10 13:49:28 2022 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: 1688053 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4MmKzS02K9z20d4 for ; Tue, 11 Oct 2022 00:49:54 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 401BE3858288 for ; Mon, 10 Oct 2022 13:49:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgbr1.qq.com (smtpbgbr1.qq.com [54.207.19.206]) by sourceware.org (Postfix) with ESMTPS id EA8C4385416F for ; Mon, 10 Oct 2022 13:49:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA8C4385416F 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: bizesmtp82t1665409771tnfcefwq Received: from rios-cad5.localdomain ( [42.247.22.65]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Oct 2022 21:49:29 +0800 (CST) X-QQ-SSF: 01400000000000D0J000000A0000000 X-QQ-FEAT: 27H4dUct9tiWlFfApkbe/+I2nX7mh2rRLx9pK4J0a/K/uPu157JaHWxtDmZPT R7vu7yg5WAlqCGqdo5fEhwirvosOoAU8T/T+ZaQkLkXqo/g1jkTF1dWKA/6AWnqQgk+Fag+ kK2zwwM8nGp3BcD40FIq3SiIlNrnARO9o1XhNapaproLxypBbe8m6cQXozRyb0U21yMzLs/ uWrQjU1b9KqBYULTfUWT2QdkylRViPN6+exIk+sWORA8RcbgOHkSvet/Z5C06bqn68C//KX 5wVmTMSathxH32tYo8jSnxMzkV+EOM/rhtOOK0oRiehy4zoC1P/E9VU0XZmH5U0PEeox1ON 8bfjZgDy4RHrFhQkxVhNBzGyRb+H444RCitK0TGAju3wWGTa+VNa6qadxZU5N9GEb8uDDBV HcA7vuPTfHw= X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V: move struct vector_type_info from *.h to *.cc. Date: Mon, 10 Oct 2022 21:49:28 +0800 Message-Id: <20221010134928.171673-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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: , Cc: kito.cheng@gmail.com, Ju-Zhe Zhong Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vector-builtins.cc (struct vector_type_info): Move from riscv-vector-builtins.h. * config/riscv/riscv-vector-builtins.h (struct vector_type_info): Move to riscv-vector-builtins.cc. --- gcc/config/riscv/riscv-vector-builtins.cc | 16 ++++++++++++++++ gcc/config/riscv/riscv-vector-builtins.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index 0096e32f5e4..d7b567a7ba1 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -50,6 +50,22 @@ using namespace riscv_vector; namespace riscv_vector { +/* Static information about each vector type. */ +struct vector_type_info +{ + /* The name of the type as declared by riscv_vector.h + which is recommend to use. For example: 'vint32m1_t'. */ + const char *name; + + /* ABI name of vector type. The type is always available + under this name, even when riscv_vector.h isn't included. + For example: '__rvv_int32m1_t'. */ + const char *abi_name; + + /* The C++ mangling of ABI_NAME. */ + const char *mangled_name; +}; + /* Information about each RVV type. */ static CONSTEXPR const vector_type_info vector_types[] = { #define DEF_RVV_TYPE(USER_NAME, NCHARS, ABI_NAME, ARGS...) \ diff --git a/gcc/config/riscv/riscv-vector-builtins.h b/gcc/config/riscv/riscv-vector-builtins.h index 6ca0b073964..524fb0b02c2 100644 --- a/gcc/config/riscv/riscv-vector-builtins.h +++ b/gcc/config/riscv/riscv-vector-builtins.h @@ -26,22 +26,6 @@ namespace riscv_vector { /* This is for segment instructions. */ const unsigned int MAX_TUPLE_SIZE = 8; -/* Static information about each vector type. */ -struct vector_type_info -{ - /* The name of the type as declared by riscv_vector.h - which is recommend to use. For example: 'vint32m1_t'. */ - const char *user_name; - - /* ABI name of vector type. The type is always available - under this name, even when riscv_vector.h isn't included. - For example: '__rvv_int32m1_t'. */ - const char *abi_name; - - /* The C++ mangling of ABI_NAME. */ - const char *mangled_name; -}; - /* Enumerates the RVV types, together called "vector types" for brevity. */ enum vector_type_index