From: Michael Meissner <meissner@linux.ibm.com>
To: Michael Meissner <meissner@linux.ibm.com>,
gcc-patches@gcc.gnu.org,
Segher Boessenkool <segher@kernel.crashing.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.ibm.com>,
Peter Bergner <bergner@linux.ibm.com>,
Will Schmidt <will_schmidt@vnet.ibm.com>
Subject: [PATCH 2/3] Set power10 fusion if -mtune=power10.
Date: Fri, 19 Nov 2021 09:55:50 -0500 [thread overview]
Message-ID: <YZe69s2sbkTzNxL5@toto.the-meissners.org> (raw)
In-Reply-To: <YZe5llec+qA6YdtE@toto.the-meissners.org>
Set power10 fusion if -mtune=power10.
In doing the patch for zero cycle moves for switch statements and indirect
jumps, I noticed the fusion support is only done if -mcpu=power10. This option
enables power10 fusion if we use -mtune=power10.
I have built and run the testsuites on little endian power9 and power10 systems
with no regressions. Can I install this patch?
2021-11-19 Michael Meissner <meissner@the-meissners.org>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Enable
power10 fusion if -mtune=power10.
(rs6000_opt_masks): Add power10 fusion options.
---
gcc/config/rs6000/rs6000.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6780304a5eb..8531cef0337 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4469,35 +4469,36 @@ rs6000_option_override_internal (bool global_init_p)
if (TARGET_POWER10 && (rs6000_isa_flags_explicit & OPTION_MASK_MMA) == 0)
rs6000_isa_flags |= OPTION_MASK_MMA;
- if (TARGET_POWER10
+ /* Enable power10 tuning if either -mcpu=power10 or -mtune=power10. */
+ if ((TARGET_POWER10 || rs6000_tune == PROCESSOR_POWER10)
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION;
- if (TARGET_POWER10 &&
+ if (TARGET_P10_FUSION &&
(rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_LD_CMPI) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_LD_CMPI;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_2LOGICAL) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_2LOGICAL;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_LOGADD) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_LOGADD;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_ADDLOG) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_ADDLOG;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_2ADD) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_2ADD;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_2STORE) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_2STORE;
- if (TARGET_POWER10
+ if (TARGET_P10_FUSION
&& (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_ZERO_CYCLE) == 0)
rs6000_isa_flags |= OPTION_MASK_P10_FUSION_ZERO_CYCLE;
@@ -24292,6 +24293,14 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] =
{ "power9-misc", OPTION_MASK_P9_MISC, false, true },
{ "power9-vector", OPTION_MASK_P9_VECTOR, false, true },
{ "power10-fusion", OPTION_MASK_P10_FUSION, false, true },
+ { "power10-fusion-ld-cmpi", OPTION_MASK_P10_FUSION_LD_CMPI, false, true },
+ { "power10-fusion-2logical", OPTION_MASK_P10_FUSION_2LOGICAL,false, true },
+ { "power10-fusion-logical-add", OPTION_MASK_P10_FUSION_LOGADD,false, true },
+ { "power10-fusion-add-logical", OPTION_MASK_P10_FUSION_ADDLOG,false, true },
+ { "power10-fusion-2add", OPTION_MASK_P10_FUSION_2ADD, false, true },
+ { "power10-fusion-2store", OPTION_MASK_P10_FUSION_2STORE, false, true },
+ { "power10-fusion-zero-cycle", OPTION_MASK_P10_FUSION_ZERO_CYCLE,
+ false, true },
{ "powerpc-gfxopt", OPTION_MASK_PPC_GFXOPT, false, true },
{ "powerpc-gpopt", OPTION_MASK_PPC_GPOPT, false, true },
{ "prefixed", OPTION_MASK_PREFIXED, false, true },
--
2.31.1
--
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com
next prev parent reply other threads:[~2021-11-19 14:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 14:49 [PATCH 0/3] Add zero cycle move support Michael Meissner
2021-11-19 14:53 ` [PATCH 1/3] Add power10 zero cycle moves for switches & indirect jumps Michael Meissner
2021-11-22 16:36 ` Bill Schmidt
2021-11-22 21:12 ` Michael Meissner
2021-12-13 17:10 ` Ping: " Michael Meissner
2021-11-19 14:55 ` Michael Meissner [this message]
2021-11-22 16:06 ` [PATCH 2/3] Set power10 fusion if -mtune=power10 Bill Schmidt
2021-11-22 21:13 ` Michael Meissner
2021-12-13 17:12 ` Ping: " Michael Meissner
2021-11-19 14:57 ` [PATCH 3/3] Use absolute switch table addresses for zero cycle moves Michael Meissner
2021-12-13 17:13 ` Ping: " Michael Meissner
2021-11-22 15:57 ` [PATCH 0/3] Add zero cycle move support Bill Schmidt
2021-11-22 16:09 ` David Edelsohn
2021-11-22 21:17 ` Michael Meissner
2021-11-23 3:41 ` HAO CHEN GUI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YZe69s2sbkTzNxL5@toto.the-meissners.org \
--to=meissner@linux.ibm.com \
--cc=bergner@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=will_schmidt@vnet.ibm.com \
--cc=wschmidt@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).