diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/riscv/riscv-opts.h | 4 | ||||
-rw-r--r-- | gcc/config/riscv/riscv-v.cc | 2 | ||||
-rw-r--r-- | gcc/config/riscv/riscv-vector-costs.cc | 4 | ||||
-rw-r--r-- | gcc/config/riscv/riscv.opt | 20 |
4 files changed, 15 insertions, 15 deletions
diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index 9ae86d5..392b916 100644 --- a/gcc/config/riscv/riscv-opts.h +++ b/gcc/config/riscv/riscv-opts.h @@ -74,7 +74,7 @@ enum stack_protector_guard { }; /* RISC-V auto-vectorization RVV LMUL. */ -enum riscv_autovec_lmul_enum { +enum rvv_max_lmul_enum { RVV_M1 = 1, RVV_M2 = 2, RVV_M4 = 4, @@ -152,6 +152,6 @@ enum rvv_vector_bits_enum { /* The maximmum LMUL according to user configuration. */ #define TARGET_MAX_LMUL \ - (int) (riscv_autovec_lmul == RVV_DYNAMIC ? RVV_M8 : riscv_autovec_lmul) + (int) (rvv_max_lmul == RVV_DYNAMIC ? RVV_M8 : rvv_max_lmul) #endif /* ! GCC_RISCV_OPTS_H */ diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index 967f4e3..814c5fe 100644 --- a/gcc/config/riscv/riscv-v.cc +++ b/gcc/config/riscv/riscv-v.cc @@ -2338,7 +2338,7 @@ preferred_simd_mode (scalar_mode mode) if (autovec_use_vlmax_p ()) { /* We use LMUL = 1 as base bytesize which is BYTES_PER_RISCV_VECTOR and - riscv_autovec_lmul as multiply factor to calculate the the NUNITS to + rvv_max_lmul as multiply factor to calculate the NUNITS to get the auto-vectorization mode. */ poly_uint64 nunits; poly_uint64 vector_size = BYTES_PER_RISCV_VECTOR * TARGET_MAX_LMUL; diff --git a/gcc/config/riscv/riscv-vector-costs.cc b/gcc/config/riscv/riscv-vector-costs.cc index 5ac8655..f462c27 100644 --- a/gcc/config/riscv/riscv-vector-costs.cc +++ b/gcc/config/riscv/riscv-vector-costs.cc @@ -890,7 +890,7 @@ costs::record_potential_unexpected_spills (loop_vec_info loop_vinfo) { /* We only want to apply the heuristic if LOOP_VINFO is being vectorized for VLA and known NITERS VLS loop. */ - if (riscv_autovec_lmul == RVV_DYNAMIC + if (rvv_max_lmul == RVV_DYNAMIC && (m_cost_type == VLA_VECTOR_COST || (m_cost_type == VLS_VECTOR_COST && LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)))) @@ -998,7 +998,7 @@ costs::better_main_loop_than_p (const vector_costs *uncast_other) const return other_prefer_unrolled; } } - else if (riscv_autovec_lmul == RVV_DYNAMIC) + else if (rvv_max_lmul == RVV_DYNAMIC) { if (other->m_has_unexpected_spills_p) { diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt index 710c0a4..7d625af 100644 --- a/gcc/config/riscv/riscv.opt +++ b/gcc/config/riscv/riscv.opt @@ -531,27 +531,27 @@ Target RejectNegative Joined UInteger Var(riscv_strcmp_inline_limit) Init(64) Max number of bytes to compare as part of inlined strcmp/strncmp routines (default: 64). Enum -Name(riscv_autovec_lmul) Type(enum riscv_autovec_lmul_enum) -The RVV possible LMUL (-param=riscv-autovec-lmul=): +Name(rvv_max_lmul) Type(enum rvv_max_lmul_enum) +The RVV possible LMUL (-mrvv-max-lmul=): EnumValue -Enum(riscv_autovec_lmul) String(m1) Value(RVV_M1) +Enum(rvv_max_lmul) String(m1) Value(RVV_M1) EnumValue -Enum(riscv_autovec_lmul) String(m2) Value(RVV_M2) +Enum(rvv_max_lmul) String(m2) Value(RVV_M2) EnumValue -Enum(riscv_autovec_lmul) String(m4) Value(RVV_M4) +Enum(rvv_max_lmul) String(m4) Value(RVV_M4) EnumValue -Enum(riscv_autovec_lmul) String(m8) Value(RVV_M8) +Enum(rvv_max_lmul) String(m8) Value(RVV_M8) EnumValue -Enum(riscv_autovec_lmul) String(dynamic) Value(RVV_DYNAMIC) +Enum(rvv_max_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. +mrvv-max-lmul= +Target RejectNegative Joined Enum(rvv_max_lmul) Var(rvv_max_lmul) Init(RVV_M1) +-mrvv-max-lmul=<string> Set the RVV LMUL of auto-vectorization. madjust-lmul-cost Target Var(TARGET_ADJUST_LMUL_COST) Init(0) |