[v2] RISC-V: Document optimization parameter riscv-strcmp-inline-limit

Message ID 20231204095500.1569673-1-christoph.muellner@vrull.eu
State Committed
Commit 82576a6e77e0a284975dda87efe4b2d5bc5b9b1c
Delegated to: Kito Cheng
Headers
Series [v2] RISC-V: Document optimization parameter riscv-strcmp-inline-limit |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
rivoscibot/toolchain-ci-rivos-apply-patch success Patch applied
rivoscibot/toolchain-ci-rivos-lint success Lint passed
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gc-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv32gc_zba_zbb_zbc_zbs-ilp32d-non-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--linux-rv64gc_zba_zbb_zbc_zbs-lp64d-non-multilib success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-arm warning Patch is already merged
rivoscibot/toolchain-ci-rivos-build--linux-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-build--newlib-rv64gcv-lp64d-multilib success Build passed
rivoscibot/toolchain-ci-rivos-test pending Testing started
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 warning Patch is already merged

Commit Message

Christoph Müllner Dec. 4, 2023, 9:55 a.m. UTC
  This patch documents the optimization parameter
riscv-strcmp-inline-limit, which can be used to tweak the behaviour
of -minline-strcmp and -minline-strncmp.

gcc/ChangeLog:

	PR target/112650
	* doc/invoke.texi: Document riscv-strcmp-inline-limit.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
---
 gcc/doc/invoke.texi | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Kito Cheng Dec. 4, 2023, 1:17 p.m. UTC | #1
LGTM

On Mon, Dec 4, 2023 at 5:55 PM Christoph Müllner
<christoph.muellner@vrull.eu> wrote:
>
> This patch documents the optimization parameter
> riscv-strcmp-inline-limit, which can be used to tweak the behaviour
> of -minline-strcmp and -minline-strncmp.
>
> gcc/ChangeLog:
>
>         PR target/112650
>         * doc/invoke.texi: Document riscv-strcmp-inline-limit.
>
> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
> ---
>  gcc/doc/invoke.texi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 6fe63b5f999..2b51ff304f6 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -29846,6 +29846,10 @@ Inlining will only be done if the strings are properly aligned
>  and instructions for accelerated processing are available.
>  The default is to not inline strcmp calls.
>
> +The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls
> +the maximum number of bytes compared by the inlined code.
> +The default value is 64.
> +
>  @opindex minline-strncmp
>  @item -minline-strncmp
>  @itemx -mno-inline-strncmp
> @@ -29854,6 +29858,10 @@ Inlining will only be done if the strings are properly aligned
>  and instructions for accelerated processing are available.
>  The default is to not inline strncmp calls.
>
> +The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls
> +the maximum number of bytes compared by the inlined code.
> +The default value is 64.
> +
>  @opindex mshorten-memrefs
>  @item -mshorten-memrefs
>  @itemx -mno-shorten-memrefs
> --
> 2.43.0
>
  

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6fe63b5f999..2b51ff304f6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -29846,6 +29846,10 @@  Inlining will only be done if the strings are properly aligned
 and instructions for accelerated processing are available.
 The default is to not inline strcmp calls.
 
+The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls
+the maximum number of bytes compared by the inlined code.
+The default value is 64.
+
 @opindex minline-strncmp
 @item -minline-strncmp
 @itemx -mno-inline-strncmp
@@ -29854,6 +29858,10 @@  Inlining will only be done if the strings are properly aligned
 and instructions for accelerated processing are available.
 The default is to not inline strncmp calls.
 
+The @option{--param riscv-strcmp-inline-limit=@var{n}} parameter controls
+the maximum number of bytes compared by the inlined code.
+The default value is 64.
+
 @opindex mshorten-memrefs
 @item -mshorten-memrefs
 @itemx -mno-shorten-memrefs