]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Rename and unify stringop strategy handling.
authorRobin Dapp <rdapp@ventanamicro.com>
Fri, 1 Dec 2023 08:30:17 +0000 (09:30 +0100)
committerRobin Dapp <rdapp@ventanamicro.com>
Mon, 4 Dec 2023 15:23:56 +0000 (16:23 +0100)
commit4ae5a7336ac8e1ba57ee1e885b5b76ed86cdbfd5
treeaa2060ef13c3123e85aefb8591e4cc1b7756fb45
parent0c2ea80a4ffbddc0bc29f5badaf2ae43e59483b2
RISC-V: Rename and unify stringop strategy handling.

In preparation for the vectorized strlen and strcmp support this NFC
patch unifies the stringop strategy handling a bit.  The "auto"
strategy now is a combination of scalar and vector and an expander
should try the strategies in their preferred order.

For the block_move expander this patch does just that.

gcc/ChangeLog:

* config/riscv/riscv-opts.h (enum riscv_stringop_strategy_enum):
Rename...
(enum stringop_strategy_enum): ... to this.
* config/riscv/riscv-string.cc (riscv_expand_block_move): New
wrapper expander handling the strategies and delegation.
(riscv_expand_block_move_scalar): Rename function and make
static.
(expand_block_move): Remove strategy handling.
* config/riscv/riscv.md: Call expander wrapper.
* config/riscv/riscv.opt: Rename.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/cpymem-strategy-1.c: Change to
-mstringop-strategy.
* gcc.target/riscv/rvv/base/cpymem-strategy-2.c: Ditto.
* gcc.target/riscv/rvv/base/cpymem-strategy-3.c: Ditto.
* gcc.target/riscv/rvv/base/cpymem-strategy-4.c: Ditto.
* gcc.target/riscv/rvv/base/cpymem-strategy-5.c: Ditto.
gcc/config/riscv/riscv-opts.h
gcc/config/riscv/riscv-string.cc
gcc/config/riscv/riscv.md
gcc/config/riscv/riscv.opt
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-1.c
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-2.c
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-3.c
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-4.c
gcc/testsuite/gcc.target/riscv/rvv/base/cpymem-strategy-5.c