* [PATCH] RISC-V: Add dynamic LMUL compile option
@ 2023-08-31 23:12 Juzhe-Zhong
2023-09-01 9:57 ` Robin Dapp
0 siblings, 1 reply; 3+ messages in thread
From: Juzhe-Zhong @ 2023-08-31 23:12 UTC (permalink / raw)
To: gcc-patches; +Cc: kito.cheng, kito.cheng, jeffreyalaw, rdapp.gcc, Juzhe-Zhong
We are going to support dynamic LMUL support.
gcc/ChangeLog:
* config/riscv/riscv-opts.h (enum riscv_autovec_lmul_enum): Add dynamic enum.
* config/riscv/riscv.opt: Add dynamic compile option.
---
gcc/config/riscv/riscv-opts.h | 4 +++-
gcc/config/riscv/riscv.opt | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h
index 5ed69abd214..79e0f12e388 100644
--- a/gcc/config/riscv/riscv-opts.h
+++ b/gcc/config/riscv/riscv-opts.h
@@ -79,7 +79,9 @@ enum riscv_autovec_lmul_enum {
RVV_M1 = 1,
RVV_M2 = 2,
RVV_M4 = 4,
- RVV_M8 = 8
+ RVV_M8 = 8,
+ /* For dynamic LMUL, we compare COST start with LMUL8. */
+ RVV_DYNAMIC = RVV_M8
};
enum riscv_multilib_select_kind {
diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
index d2407c3c502..eca0dda4dd5 100644
--- a/gcc/config/riscv/riscv.opt
+++ b/gcc/config/riscv/riscv.opt
@@ -311,6 +311,9 @@ Enum(riscv_autovec_lmul) String(m4) Value(RVV_M4)
EnumValue
Enum(riscv_autovec_lmul) String(m8) Value(RVV_M8)
+EnumValue
+Enum(riscv_autovec_lmul) String(dynamic) Value(RVV_DYNAMIC)
+
-param=riscv-autovec-lmul=
Target RejectNegative Joined Enum(riscv_autovec_lmul) Var(riscv_autovec_lmul) Init(RVV_M1)
-param=riscv-autovec-lmul=<string> Set the RVV LMUL of auto-vectorization in the RISC-V port.
--
2.36.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: Add dynamic LMUL compile option
2023-08-31 23:12 [PATCH] RISC-V: Add dynamic LMUL compile option Juzhe-Zhong
@ 2023-09-01 9:57 ` Robin Dapp
2023-09-01 10:59 ` Li, Pan2
0 siblings, 1 reply; 3+ messages in thread
From: Robin Dapp @ 2023-09-01 9:57 UTC (permalink / raw)
To: Juzhe-Zhong, gcc-patches; +Cc: rdapp.gcc, kito.cheng, kito.cheng, jeffreyalaw
LGTM
Regards
Robin
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] RISC-V: Add dynamic LMUL compile option
2023-09-01 9:57 ` Robin Dapp
@ 2023-09-01 10:59 ` Li, Pan2
0 siblings, 0 replies; 3+ messages in thread
From: Li, Pan2 @ 2023-09-01 10:59 UTC (permalink / raw)
To: Robin Dapp, Juzhe-Zhong, gcc-patches; +Cc: kito.cheng, kito.cheng
Committed, thanks Robin.
Pan
-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Robin Dapp via Gcc-patches
Sent: Friday, September 1, 2023 5:58 PM
To: Juzhe-Zhong <juzhe.zhong@rivai.ai>; gcc-patches@gcc.gnu.org
Cc: kito.cheng@sifive.com; kito.cheng@gmail.com
Subject: Re: [PATCH] RISC-V: Add dynamic LMUL compile option
LGTM
Regards
Robin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-01 10:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 23:12 [PATCH] RISC-V: Add dynamic LMUL compile option Juzhe-Zhong
2023-09-01 9:57 ` Robin Dapp
2023-09-01 10:59 ` Li, Pan2
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).