* [PATCH] RISC-V: Refine function args of some functions.
@ 2023-01-18 3:13 juzhe.zhong
2023-01-27 10:05 ` Kito Cheng
0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2023-01-18 3:13 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, palmer, Ju-Zhe Zhong
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Refine function args.
(emit_vsetvl_insn): Ditto.
---
gcc/config/riscv/riscv-vsetvl.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index 728a32dacd6..e11751f00af 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -580,7 +580,7 @@ has_vector_insn (function *fn)
/* Emit vsetvl instruction. */
static rtx
-gen_vsetvl_pat (enum vsetvl_type insn_type, vl_vtype_info info, rtx vl)
+gen_vsetvl_pat (enum vsetvl_type insn_type, const vl_vtype_info &info, rtx vl)
{
rtx avl = info.get_avl ();
rtx sew = gen_int_mode (info.get_sew (), Pmode);
@@ -600,7 +600,7 @@ gen_vsetvl_pat (enum vsetvl_type insn_type, vl_vtype_info info, rtx vl)
}
static rtx
-gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info info)
+gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info &info)
{
rtx new_pat;
if (vsetvl_insn_p (rinsn) || vlmax_avl_p (info.get_avl ()))
@@ -617,7 +617,7 @@ gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info info)
static void
emit_vsetvl_insn (enum vsetvl_type insn_type, enum emit_type emit_type,
- vl_vtype_info info, rtx vl, rtx_insn *rinsn)
+ const vl_vtype_info &info, rtx vl, rtx_insn *rinsn)
{
rtx pat = gen_vsetvl_pat (insn_type, info, vl);
if (dump_file)
--
2.36.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RISC-V: Refine function args of some functions.
2023-01-18 3:13 [PATCH] RISC-V: Refine function args of some functions juzhe.zhong
@ 2023-01-27 10:05 ` Kito Cheng
0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2023-01-27 10:05 UTC (permalink / raw)
To: juzhe.zhong; +Cc: gcc-patches, palmer
[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]
committed, thanks!
On Wed, Jan 18, 2023 at 11:13 AM <juzhe.zhong@rivai.ai> wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Refine function
> args.
> (emit_vsetvl_insn): Ditto.
>
> ---
> gcc/config/riscv/riscv-vsetvl.cc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv-vsetvl.cc
> b/gcc/config/riscv/riscv-vsetvl.cc
> index 728a32dacd6..e11751f00af 100644
> --- a/gcc/config/riscv/riscv-vsetvl.cc
> +++ b/gcc/config/riscv/riscv-vsetvl.cc
> @@ -580,7 +580,7 @@ has_vector_insn (function *fn)
>
> /* Emit vsetvl instruction. */
> static rtx
> -gen_vsetvl_pat (enum vsetvl_type insn_type, vl_vtype_info info, rtx vl)
> +gen_vsetvl_pat (enum vsetvl_type insn_type, const vl_vtype_info &info,
> rtx vl)
> {
> rtx avl = info.get_avl ();
> rtx sew = gen_int_mode (info.get_sew (), Pmode);
> @@ -600,7 +600,7 @@ gen_vsetvl_pat (enum vsetvl_type insn_type,
> vl_vtype_info info, rtx vl)
> }
>
> static rtx
> -gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info info)
> +gen_vsetvl_pat (rtx_insn *rinsn, const vector_insn_info &info)
> {
> rtx new_pat;
> if (vsetvl_insn_p (rinsn) || vlmax_avl_p (info.get_avl ()))
> @@ -617,7 +617,7 @@ gen_vsetvl_pat (rtx_insn *rinsn, const
> vector_insn_info info)
>
> static void
> emit_vsetvl_insn (enum vsetvl_type insn_type, enum emit_type emit_type,
> - vl_vtype_info info, rtx vl, rtx_insn *rinsn)
> + const vl_vtype_info &info, rtx vl, rtx_insn *rinsn)
> {
> rtx pat = gen_vsetvl_pat (insn_type, info, vl);
> if (dump_file)
> --
> 2.36.3
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-27 10:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 3:13 [PATCH] RISC-V: Refine function args of some functions juzhe.zhong
2023-01-27 10:05 ` 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).