public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/acsawdey/heads/reassoc-new)] add cutoffs for plus/logical and mult below which we wont do parallel reassoc.
@ 2021-08-19 16:18 Aaron Sawdey
  0 siblings, 0 replies; only message in thread
From: Aaron Sawdey @ 2021-08-19 16:18 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f724d04a522c6d6c3d0609bbf52da3e94bd0ba42

commit f724d04a522c6d6c3d0609bbf52da3e94bd0ba42
Author: Aaron Sawdey <acsawdey@linux.ibm.com>
Date:   Thu Aug 19 11:17:45 2021 -0500

    add cutoffs for plus/logical and mult below which we wont do parallel reassoc.

Diff:
---
 gcc/config/rs6000/rs6000.c   | 11 ++++++++++-
 gcc/config/rs6000/rs6000.opt |  8 ++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 8ee7502df67..33256cea572 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -9936,7 +9936,7 @@ rs6000_offsettable_memref_p (rtx op, machine_mode reg_mode, bool strict)
  
 static int
 rs6000_reassociation_width (unsigned int opc_in, machine_mode mode,
-			    unsigned int num_op ATTRIBUTE_UNUSED)
+			    unsigned int num_op)
 {
   tree_code opc = (tree_code)opc_in;
   bool isPlus=false, isMult=false;
@@ -9944,10 +9944,19 @@ rs6000_reassociation_width (unsigned int opc_in, machine_mode mode,
     {
     case PLUS_EXPR:
       isPlus=true;
+      if (num_op < (unsigned int)rs6000_min_reassoc_plus)
+	return 1;
       break;
     case MULT_EXPR:
       isMult=true;
+      if (num_op < (unsigned int)rs6000_min_reassoc_mult)
+	return 1;
       break;
+    case BIT_IOR_EXPR:
+    case BIT_XOR_EXPR:
+    case BIT_AND_EXPR:
+      if (num_op < (unsigned int)rs6000_min_reassoc_plus)
+	return 1;
     default:
       break;
     }
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 0538db387dc..2147d851485 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -320,6 +320,14 @@ mvrsave=yes
 Target RejectNegative Alias(mvrsave) Warn(%<-mvrsave=yes%> is deprecated; use %<-mvrsave%> instead)
 Deprecated option.  Use -mvrsave instead.
 
+mmin-reassoc-plus=
+Target Var(rs6000_min_reassoc_plus) Init(0) RejectNegative Joined UInteger Save
+testing .. min reassoc terms to do parallel reassociation for plus
+
+mmin-reassoc-mult=
+Target Var(rs6000_min_reassoc_mult) Init(0) RejectNegative Joined UInteger Save
+testing .. min reassoc terms to do parallel reassociation for multiply
+
 mblock-move-inline-limit=
 Target Var(rs6000_block_move_inline_limit) Init(0) RejectNegative Joined UInteger Save
 Max number of bytes to move inline.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-19 16:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 16:18 [gcc(refs/users/acsawdey/heads/reassoc-new)] add cutoffs for plus/logical and mult below which we wont do parallel reassoc Aaron Sawdey

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).