From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by sourceware.org (Postfix) with ESMTPS id 904C93858C50 for ; Sun, 23 Apr 2023 11:34:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 904C93858C50 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: bizesmtp62t1682249636t9ikaaix Received: from server1.localdomain ( [58.60.1.22]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 23 Apr 2023 19:33:55 +0800 (CST) X-QQ-SSF: 01400000000000F0P000000A0000000 X-QQ-FEAT: eeGIu46hDGjv7ey+bqP+AwvVYFV1rW24Ljvonp+ckQClOPMb9hLX/U/MSMSrz USz9CSa4Nj4UI7eDPFWhUerKMQrgg9luYgXbyRoJib1Wy6Uwgug5CkqP0Ywbqt2EtTakKdr x69S+PK29ngJniYw9Q7+2XxyqYyOFoht55yXBiE2kxwrq+5HQy7oePGGY5U+4YcJynvAff/ RQXs4DIIYc6lYa5wjhM1pzEi6XupttwziwR3VZJE6cOVBhOOaB4PJo8h1LlsdMYehKay+1t 7igF1wlYEQseyKm6TciJiCkwRgHJlbxcyL6iU9iOKpGnGSdPgkZXjJruwT+kpv80Qq0iq2A qzOCQxIMcCIRsWH/aHBsdJVIBGU/IUfOOhXZltdjWPGxNZtFkE4qwL4HNQC+4ZrXAG+ajg2 X-QQ-GoodBg: 2 X-BIZMAIL-ID: 9283073882296796631 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, jeffreyalaw@gmail.com, Juzhe-Zhong Subject: [PATCH] RISC-V: Add function comment for cleanup_insns. Date: Sun, 23 Apr 2023 19:33:54 +0800 Message-Id: <20230423113354.141950-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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 List-Id: From: Juzhe-Zhong Address Jeff's comment: https://patchwork.sourceware.org/project/gcc/patch/20230330012804.110539-1-juzhe.zhong@rivai.ai/ Add a function comment. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::pre_vsetvl): Add function comment for cleanup_insns. --- gcc/config/riscv/riscv-vsetvl.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index ac99028df43..fa68b8a0462 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -3998,6 +3998,21 @@ pass_vsetvl::pre_vsetvl (void) commit_edge_insertions (); } +/* Before VSETVL PASS, RVV instructions pattern is depending on AVL operand + implicitly. Since we will emit VSETVL instruction and make RVV instructions + depending on VL/VTYPE global status registers, we remove the such AVL operand + in the RVV instructions pattern here in order to remove AVL dependencies when + AVL operand is a register operand. + + Before the VSETVL PASS: + li a5,32 + ... + vadd.vv (..., a5) + After the VSETVL PASS: + li a5,32 + vsetvli zero, a5, ... + ... + vadd.vv (..., const_int 0). */ void pass_vsetvl::cleanup_insns (void) const { -- 2.36.1