From patchwork Sun Apr 23 11:33:54 2023 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: 86693 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2148555vqo; Sun, 23 Apr 2023 04:34:37 -0700 (PDT) X-Google-Smtp-Source: AKy350ZBYlTNGqDtKETNuuj+12aiCCLtQc97+NJhHFC3j9dRC7kG5tZRjfpgPQNNeL4fvluHkoOP X-Received: by 2002:a17:907:3a07:b0:94f:4102:25c8 with SMTP id fb7-20020a1709073a0700b0094f410225c8mr6057331ejc.61.1682249677259; Sun, 23 Apr 2023 04:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682249677; cv=none; d=google.com; s=arc-20160816; b=ch+FWmiU7JO8389nXX5ggmphe3DHio5KZqRdQqu6kYjyA3oA4lnCOCl7LuNUGzDTW2 RrvBLK9eIuGA/biDvXZg6cgPgPZxPF5fBcKXaaqgf9koHYZiobuQIYTnbiJdcREhH0MO VTW2SLKbVCYXVFWwKOTRGf14J7sEqTQzUzPkJi717cGthdvKFdcicVUBrprjHg5LzB8S BRok06vjnado2wkE125rFNAhuZZHEodxJZQjxS4NsAhBhq+JjtOmO1xUOTGe+MnqMVPR j1bNFVaQFlonRX3t73UpeX1mnLvixKsc03jSqgkNZGm+WgK3EpWkyriTKZENReZ9nYhS RO+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dmarc-filter:delivered-to; bh=dLcEz96jKtPz66Mt1YNiRr1AUV54LM43yxDaMoSuMuY=; b=ygfxSdx8x6a9aGuGeTfddLIJd49LAjblnwiW0RMskjBAoEUaRJ50fZEai+5LBjouck rz21pttq1FSn/NHOpvBYw56J/jUuIjd+uR6yI28XglE9lKQVZ5PGwIuXn0FxMvUn4wsy FYDDhRiOS+RxWwj1L2fzDKRjlyGUXFh3DXbFOriNo84r2KbLUMD4ma6PkiNdZ1fnnxqP Uj3I77m4ScXdHT19uIXBd9tQ++Drdy2Z57cThuNMPonCFUgL9eCV0LJIBvcvVzRrFBSA DPwR8DDnha3wSE8x8Emzlf/iJsNG5hj7N7hqb+d7U1/9Y1EZQUFctYs2FlyCuCz5/7Ea 4IPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id y23-20020aa7c257000000b0050687c1a50asi7103519edo.621.2023.04.23.04.34.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 04:34:37 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 BD95E3858005 for ; Sun, 23 Apr 2023 11:34:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763966637212811036?= X-GMAIL-MSGID: =?utf-8?q?1763966637212811036?= 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 {