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: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 1867 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1591745wrs; Mon, 10 Oct 2022 06:50:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4d5qH6hbH9plhQU6JKfS1HTLAEuxaPAduOK0NbVr0cZ2a+2u4itQiSykCnasKLDArZt+9L X-Received: by 2002:a05:6402:204:b0:459:aa70:d472 with SMTP id t4-20020a056402020400b00459aa70d472mr17750485edv.163.1665409816741; Mon, 10 Oct 2022 06:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665409816; cv=none; d=google.com; s=arc-20160816; b=GV99vtMGv7Dn5KlEKaWAio0kgI3DoMAmZS/YekdRga7GHZvClFeMADGErY8Et0b1gx JYOF70MuIoOpSpm58F2Kx/7e75LiNhvQySn1BnlBnYmOvS3mdopuwKcaOHPs3HtfPTcJ 4CXn5bjFF/pEufdQiD2YHEAJbGmlysS2U2wV8MguCT5hlPghGcGIc406jd8znUApRnNI B9UxnyJPaxDsR9XYotvWLGNXUSiRM0MCWiqkKZgOgDRATk2sjxUNlOlvrHhCn8iqL1xi Wvo66qJfOrFESew2+UKIf+LMmcXr86zFd6BgEoia2tZqYdjWV3FiGDuOsZBK59N9aMWM Tffw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:to :from:dmarc-filter:delivered-to; bh=tnckRhLc9aI4Y2IGsmviLHReL6IEN917TJQVWxIcQyw=; b=D6SYfzL/oXM+pDQU1bMX+lljPrQybQk0RcSq2riJQaMQYgHa1cpH8XmPAV1+LwoXOy Cj5Vaz81Q5HzESTRXsou4ygRc4VUFHnDQkarTDIyQp6sALVHETz3xRrRmH+dFlPH2Kak 2IN2OZBN4PCBiWBG5Es+95TKn42qH91wIZnhN/KuT4b0M1zAIyrHSfaRbe5SN0SWUDRe AAWRW+Z7RH30TOPQJPJAJn83AFmC4Gx4Ghjypas1sfm6yQ7yfGnJ3Ehaw4uvU7aXThYO MoKJigXQO/OsOz2gR5TogMRrV0JT/MxEvqRrHAjqICz7h1Y5DnsRMJNrO4tOougR+dHI 7c2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id dm21-20020a170907949500b0073d6c39d4bcsi10563880ejc.653.2022.10.10.06.50.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 06:50:16 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77B09385741C for ; Mon, 10 Oct 2022 13:50:04 +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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746308764140267580?= X-GMAIL-MSGID: =?utf-8?q?1746308764140267580?= 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