public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Rename insn into rinsn for rtx_insn *
@ 2023-01-09 22:56 juzhe.zhong
  2023-01-26 19:16 ` Kito Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2023-01-09 22:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: kito.cheng, palmer, Ju-Zhe Zhong

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RISC-V: Rename insn into rinsn for rtx_insn *
  2023-01-09 22:56 [PATCH] RISC-V: Rename insn into rinsn for rtx_insn * juzhe.zhong
@ 2023-01-26 19:16 ` Kito Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2023-01-26 19:16 UTC (permalink / raw)
  To: juzhe.zhong; +Cc: gcc-patches, palmer

[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]

committed, thanks.

On Tue, Jan 10, 2023 at 6:57 AM <juzhe.zhong@rivai.ai> wrote:

> 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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-26 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 22:56 [PATCH] RISC-V: Rename insn into rinsn for rtx_insn * juzhe.zhong
2023-01-26 19:16 ` Kito Cheng

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).