public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves
@ 2022-11-15 18:54 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2022-11-15 18:54 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cf83c4f88df6149adbd23dd1e80c5ec328ab7afb
commit cf83c4f88df6149adbd23dd1e80c5ec328ab7afb
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Tue Nov 15 13:54:16 2022 -0500
Add parameter for memcpy inline code moves
2022-11-15 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000.opt (rs6000-memcpy-inline-bytes): New parameter,
set to 0.
* config/rs6000/rs6000-string.cc (expand_block_move): Only do
optimization if rs6000-memcpy-inline-bytes <= 16.
Diff:
---
gcc/config/rs6000/rs6000-string.cc | 6 ++++--
gcc/config/rs6000/rs6000.opt | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc
index 2468e375781..243be4f396d 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2766,7 +2766,9 @@ expand_block_move (rtx operands[], bool might_overlap)
if (! constp)
{
if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT
- && !optimize_size)
+ && rs6000_memcpy_inline_bytes > 0
+ && rs6000_memcpy_inline_bytes <= GET_MODE_SIZE (V16QImode)
+ && optimize && !optimize_size)
{
rtx join_label = gen_label_rtx ();
rtx inline_label = gen_label_rtx ();
@@ -2779,7 +2781,7 @@ expand_block_move (rtx operands[], bool might_overlap)
: convert_to_mode (Pmode, bytes_rtx, true));
rtx cr = gen_reg_rtx (CCUNSmode);
- rtx max_size = GEN_INT (16);
+ rtx max_size = GEN_INT (rs6000_memcpy_inline_bytes);
emit_insn (gen_rtx_SET (cr,
gen_rtx_COMPARE (CCUNSmode, bytes_rtx,
max_size)));
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 6872d359952..90dc91a277f 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -687,3 +687,8 @@ default value is 4.
Target Undocumented Joined UInteger Var(rs6000_vect_unroll_reduc_threshold) Init(1) Param
When reduction factor computed for a loop exceeds the threshold specified by
this parameter, prefer to unroll this loop. The default value is 1.
+
+-param=rs6000-memcpy-inline-bytes=
+Target Undocumented Joined UInteger Var(rs6000_memcpy_inline_bytes) Init(0) Param
+Maximum number of bytes to move with inline code before calling the memcpy
+library function. The default value is 0.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves
@ 2022-11-17 21:54 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2022-11-17 21:54 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:92f5b212e8b335680dddc344a563f4f973389f01
commit 92f5b212e8b335680dddc344a563f4f973389f01
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Tue Nov 15 13:54:16 2022 -0500
Add parameter for memcpy inline code moves
2022-11-15 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000.opt (rs6000-memcpy-inline-bytes): New parameter,
set to 0.
* config/rs6000/rs6000-string.cc (expand_block_move): Only do
optimization if rs6000-memcpy-inline-bytes <= 16.
Diff:
---
gcc/config/rs6000/rs6000-string.cc | 6 ++++--
gcc/config/rs6000/rs6000.opt | 5 +++++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc
index 2468e375781..243be4f396d 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2766,7 +2766,9 @@ expand_block_move (rtx operands[], bool might_overlap)
if (! constp)
{
if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT
- && !optimize_size)
+ && rs6000_memcpy_inline_bytes > 0
+ && rs6000_memcpy_inline_bytes <= GET_MODE_SIZE (V16QImode)
+ && optimize && !optimize_size)
{
rtx join_label = gen_label_rtx ();
rtx inline_label = gen_label_rtx ();
@@ -2779,7 +2781,7 @@ expand_block_move (rtx operands[], bool might_overlap)
: convert_to_mode (Pmode, bytes_rtx, true));
rtx cr = gen_reg_rtx (CCUNSmode);
- rtx max_size = GEN_INT (16);
+ rtx max_size = GEN_INT (rs6000_memcpy_inline_bytes);
emit_insn (gen_rtx_SET (cr,
gen_rtx_COMPARE (CCUNSmode, bytes_rtx,
max_size)));
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 6872d359952..90dc91a277f 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -687,3 +687,8 @@ default value is 4.
Target Undocumented Joined UInteger Var(rs6000_vect_unroll_reduc_threshold) Init(1) Param
When reduction factor computed for a loop exceeds the threshold specified by
this parameter, prefer to unroll this loop. The default value is 1.
+
+-param=rs6000-memcpy-inline-bytes=
+Target Undocumented Joined UInteger Var(rs6000_memcpy_inline_bytes) Init(0) Param
+Maximum number of bytes to move with inline code before calling the memcpy
+library function. The default value is 0.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves
@ 2022-11-17 21:54 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2022-11-17 21:54 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b65e4974ba99db96038cd29363f650ec482bafea
commit b65e4974ba99db96038cd29363f650ec482bafea
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Tue Nov 15 12:27:09 2022 -0500
Add parameter for memcpy inline code moves
2022-11-15 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000.opt (rs6000-memcpy-inline-bytes): New parameter,
set to 0.
* config/rs6000/rs6000-string.cc (expand_block_move): Only do
optimization if rs6000-memcpy-inline-bytes is 16.
Diff:
---
gcc/config/rs6000/rs6000-string.cc | 1 +
gcc/config/rs6000/rs6000.opt | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc
index 2468e375781..1fa2d1fe553 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2766,6 +2766,7 @@ expand_block_move (rtx operands[], bool might_overlap)
if (! constp)
{
if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT
+ && rs6000_memcpy_inline_bytes == 16
&& !optimize_size)
{
rtx join_label = gen_label_rtx ();
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 6872d359952..90dc91a277f 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -687,3 +687,8 @@ default value is 4.
Target Undocumented Joined UInteger Var(rs6000_vect_unroll_reduc_threshold) Init(1) Param
When reduction factor computed for a loop exceeds the threshold specified by
this parameter, prefer to unroll this loop. The default value is 1.
+
+-param=rs6000-memcpy-inline-bytes=
+Target Undocumented Joined UInteger Var(rs6000_memcpy_inline_bytes) Init(0) Param
+Maximum number of bytes to move with inline code before calling the memcpy
+library function. The default value is 0.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves
@ 2022-11-15 17:27 Michael Meissner
0 siblings, 0 replies; 4+ messages in thread
From: Michael Meissner @ 2022-11-15 17:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e1efca6e71ebf7c6fed3eced75a2cd1cb62e3667
commit e1efca6e71ebf7c6fed3eced75a2cd1cb62e3667
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Tue Nov 15 12:27:09 2022 -0500
Add parameter for memcpy inline code moves
2022-11-15 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000.opt (rs6000-memcpy-inline-bytes): New parameter,
set to 0.
* config/rs6000/rs6000-string.cc (expand_block_move): Only do
optimization if rs6000-memcpy-inline-bytes is 16.
Diff:
---
gcc/config/rs6000/rs6000-string.cc | 1 +
gcc/config/rs6000/rs6000.opt | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc
index 2468e375781..1fa2d1fe553 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2766,6 +2766,7 @@ expand_block_move (rtx operands[], bool might_overlap)
if (! constp)
{
if (TARGET_BLOCK_OPS_UNALIGNED_VSX && TARGET_P9_VECTOR && TARGET_64BIT
+ && rs6000_memcpy_inline_bytes == 16
&& !optimize_size)
{
rtx join_label = gen_label_rtx ();
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 6872d359952..90dc91a277f 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -687,3 +687,8 @@ default value is 4.
Target Undocumented Joined UInteger Var(rs6000_vect_unroll_reduc_threshold) Init(1) Param
When reduction factor computed for a loop exceeds the threshold specified by
this parameter, prefer to unroll this loop. The default value is 1.
+
+-param=rs6000-memcpy-inline-bytes=
+Target Undocumented Joined UInteger Var(rs6000_memcpy_inline_bytes) Init(0) Param
+Maximum number of bytes to move with inline code before calling the memcpy
+library function. The default value is 0.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-17 21:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 18:54 [gcc(refs/users/meissner/heads/dmf004)] Add parameter for memcpy inline code moves Michael Meissner
-- strict thread matches above, loose matches on Subject: below --
2022-11-17 21:54 Michael Meissner
2022-11-17 21:54 Michael Meissner
2022-11-15 17:27 Michael Meissner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).