On 4/19/23 10:42, juzhe.zh...@rivai.ai wrote:
From: Ju-Zhe Zhong <juzhe.zh...@rivai.ai>

This patch is adding 2 compile option for RVV auto-vectorization.
1. -param=riscv-autovec-preference=
    This option is to specify the auto-vectorization approach for RVV.
    Currently, we only support scalable and fixed-vlmax.
- scalable means VLA auto-vectorization. The vector-length to compiler is
       unknown and runtime invariant. Such approach can allow us compile the 
code
       run on any vector-length RVV CPU.
- fixed-vlmax means the compile known the RVV CPU vector-length, compile option
       in fixed-length VLS auto-vectorization. Meaning if we specify 
vector-length=512.
       The execution file can only run on vector-length = 512 RVV CPU.
- TODO: we may need to support min-length VLS auto-vectorization, means the execution
       file can run on larger length RVV CPU.
2. -param=riscv-autovec-lmul=
    Specify LMUL choosing for RVV auto-vectorization.

gcc/ChangeLog:

         * config/riscv/riscv-opts.h (enum riscv_autovec_preference_enum): Add 
enum for auto-vectorization preference.
         (enum riscv_autovec_lmul_enum): Add enum for choosing LMUL of RVV 
auto-vectorization.
         * config/riscv/riscv.opt: Add compile option for RVV 
auto-vectorization.
I've pushed this to the trunk.

Thanks,
jeff

Reply via email to