public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: juzhe.zhong@rivai.ai
To: gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, palmer@dabbelt.com,
	Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Subject: [PATCH] RISC-V: Rename insn into rinsn for rtx_insn *
Date: Tue, 10 Jan 2023 06:56:43 +0800	[thread overview]
Message-ID: <20230109225643.150853-1-juzhe.zhong@rivai.ai> (raw)

From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

Since the PASS is implemented base on RTL_SSA framework.
According to rtl_ssa, they name insn_info * as insn and
name rtx_insn * rinsn. I follow this rule in this pass but I missed
this function. So rename it to make codes be consistent to RTL_SSA
framework.

gcc/ChangeLog:

        * config/riscv/riscv-vsetvl.cc (add_label_notes):

---
 gcc/config/riscv/riscv-vsetvl.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index a972c49561a..3c920779992 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -682,7 +682,7 @@ insert_vsetvl (enum emit_type emit_type, rtx_insn *rinsn,
    necessary REG_LABEL_OPERAND and REG_LABEL_TARGET notes.  */
 
 static void
-add_label_notes (rtx x, rtx_insn *insn)
+add_label_notes (rtx x, rtx_insn *rinsn)
 {
   enum rtx_code code = GET_CODE (x);
   int i, j;
@@ -699,8 +699,8 @@ add_label_notes (rtx x, rtx_insn *insn)
       /* There's no reason for current users to emit jump-insns with
 	 such a LABEL_REF, so we don't have to handle REG_LABEL_TARGET
 	 notes.  */
-      gcc_assert (!JUMP_P (insn));
-      add_reg_note (insn, REG_LABEL_OPERAND, label_ref_label (x));
+      gcc_assert (!JUMP_P (rinsn));
+      add_reg_note (rinsn, REG_LABEL_OPERAND, label_ref_label (x));
 
       if (LABEL_P (label_ref_label (x)))
 	LABEL_NUSES (label_ref_label (x))++;
@@ -711,10 +711,10 @@ add_label_notes (rtx x, rtx_insn *insn)
   for (i = GET_RTX_LENGTH (code) - 1, fmt = GET_RTX_FORMAT (code); i >= 0; i--)
     {
       if (fmt[i] == 'e')
-	add_label_notes (XEXP (x, i), insn);
+	add_label_notes (XEXP (x, i), rinsn);
       else if (fmt[i] == 'E')
 	for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-	  add_label_notes (XVECEXP (x, i, j), insn);
+	  add_label_notes (XVECEXP (x, i, j), rinsn);
     }
 }
 
-- 
2.36.1


             reply	other threads:[~2023-01-09 22:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 22:56 juzhe.zhong [this message]
2023-01-26 19:16 ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230109225643.150853-1-juzhe.zhong@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).