public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: juzhe.zhong@rivai.ai
Cc: gcc-patches@gcc.gnu.org, palmer@dabbelt.com, jeffreyalaw@gmail.com
Subject: Re: [PATCH] RISC-V: Add function comment for cleanup_insns.
Date: Mon, 24 Apr 2023 14:25:45 +0800	[thread overview]
Message-ID: <CA+yXCZBbXtSP+sr7qOtH2O=aaXWz7WTUj5CVVPnnDdHz-NUisw@mail.gmail.com> (raw)
In-Reply-To: <20230423113354.141950-1-juzhe.zhong@rivai.ai>

Pushed

On Sun, Apr 23, 2023 at 7:34 PM <juzhe.zhong@rivai.ai> wrote:
>
> From: Juzhe-Zhong <juzhe.zhong@rivai.ai>
>
> 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
>

      reply	other threads:[~2023-04-24  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 11:33 juzhe.zhong
2023-04-24  6:25 ` Kito Cheng [this message]

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='CA+yXCZBbXtSP+sr7qOtH2O=aaXWz7WTUj5CVVPnnDdHz-NUisw@mail.gmail.com' \
    --to=kito.cheng@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --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).