[gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add dynamic LMUL compile option
Jeff Law
law@gcc.gnu.org
Mon Sep 11 13:35:22 GMT 2023
https://gcc.gnu.org/g:1d51bb80f2f63e38aa1c8884e6060804bcc0b926
commit 1d51bb80f2f63e38aa1c8884e6060804bcc0b926
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date: Fri Sep 1 07:12:17 2023 +0800
RISC-V: Add dynamic LMUL compile option
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.
(cherry picked from commit ef4e916b526a65411a577126d34c3b0bb97b6111)
Diff:
---
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 5ed69abd214d..79e0f12e3885 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 d2407c3c5021..eca0dda4dd5c 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.
More information about the Gcc-cvs
mailing list