On 12/22/23 12:45, Vineet Gupta wrote:
RVV requires VSET?VL? instructions to dynamically configure VLEN at
runtime. There's a custom pass to do that which has a simple mode
which generates a VSETVL for each V insn and a lazy/optimal mode which
uses LCM dataflow to move VSETVL around, identify/delete the redundant
ones.

Currently simple mode is default for !optimize invocations while lazy
mode being the default.

This patch allows simple mode to be forced via a toggle independent of
the optimization level. A lot of gcc developers are currently doing this
in some form in their local setups, as in the initial phase of autovec
development issues are expected. It makes sense to provide this facility
upstream. It could potentially also be used by distro builder for any
quick workarounds in autovec bugs of future.

gcc/ChangeLog:
        * config/riscv/riscv.opt: New -param=vsetvl-strategy.
        * config/riscv/riscv-opts.h: New enum vsetvl_strategy_enum.
        * config/riscv/riscv-vsetvl.cc
        (pre_vsetvl::pre_global_vsetvl_info): Use vsetvl_strategy.
        (pass_vsetvl::execute): Use vsetvl_strategy.
OK if we mark them as undocumented since I would expect these are really just for developers to use during bring-up/debugging and ideally the param will disappear by gcc-15.


While I realize there are differing ideas on the set of knobs we may want to turn during the debugging phases, we can fault the different sets of knobs in as we need them.

jeff

Reply via email to