]> gcc.gnu.org Git - gcc.git/commit
[committed] [RISC-V] Allow uarchs to set TARGET_OVERLAP_OP_BY_PIECES_P
authorChristoph Müllner <christoph.muellner@vrull.eu>
Tue, 7 May 2024 21:16:21 +0000 (15:16 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 7 May 2024 21:17:16 +0000 (15:17 -0600)
commit300393484dbfa9fd3891174ea47aa3fb41915abc
tree39eb7af6e2381925e5d5efa8ffcb0482da1e9fc1
parent17458d2bc74b904968e6bdc12527eb040c8d2370
[committed] [RISC-V] Allow uarchs to set TARGET_OVERLAP_OP_BY_PIECES_P

This is almost exclusively work from the VRULL team.

As we've discussed in the Tuesday meeting in the past, we'd like to have a knob
in the tuning structure to indicate that overlapped stores during
move_by_pieces expansion of memcpy & friends are acceptable.

This patch adds the that capability in our tuning structure.  It's off for all
the uarchs upstream, but we have been using it inside Ventana for our uarch
with success.  So technically it's NFC upstream, but puts in the infrastructure
multiple organizations likely need.

gcc/

* config/riscv/riscv.cc (struct riscv_tune_param): Add new
"overlap_op_by_pieces" field.
(rocket_tune_info, sifive_7_tune_info): Set it.
(sifive_p400_tune_info, sifive_p600_tune_info): Likewise.
(thead_c906_tune_info, xiangshan_nanhu_tune_info): Likewise.
(generic_ooo_tune_info, optimize_size_tune_info): Likewise.
(riscv_overlap_op_by_pieces): New function.
(TARGET_OVERLAP_OP_BY_PIECES_P): define.

gcc/testsuite/

* gcc.target/riscv/memcpy-nonoverlapping.c: New test.
* gcc.target/riscv/memset-nonoverlapping.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/memcpy-nonoverlapping.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/memset-nonoverlapping.c [new file with mode: 0644]
This page took 0.06219 seconds and 5 git commands to generate.