diff mbox series

[3/3] Use absolute switch table addresses for zero cycle moves.

Message ID YZe7be/SUobW7Qek@toto.the-meissners.org
State New
Headers show
Series Add zero cycle move support | expand

Commit Message

Michael Meissner Nov. 19, 2021, 2:57 p.m. UTC
se absolute switch table addresses for zero cycle moves.

This option enables using absolute addresses in switch tables if the
power10 zero cycle move tuning is turned on.  The combination of using
absolute addresses in switch tables along with zero cycle moves seems to
give the best performance.

I have built and run bootstrapped compilers on little endian power9 and power10
systems.  There were no regressions.  Can I install this patch?

2021-11-19  Michael Meissner  <meissner@the-meissners.org>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Use
	absolute addresses in switch tables if power10 zero cycle move
	fusion is enabled.
---
 gcc/config/rs6000/rs6000.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Michael Meissner Dec. 13, 2021, 5:13 p.m. UTC | #1
Ping patch.

| Date: Fri, 19 Nov 2021 09:57:49 -0500
| From: Michael Meissner <meissner@linux.ibm.com>
| Subject: [PATCH 3/3] Use absolute switch table addresses for zero cycle moves.
| Message-ID: <YZe7be/SUobW7Qek@toto.the-meissners.org>

https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585007.html

Note, I will on-line through December 20th.  I will be off-line December 21st
through January 1st.
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 8531cef0337..dc942765828 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4502,6 +4502,12 @@  rs6000_option_override_internal (bool global_init_p)
       && (rs6000_isa_flags_explicit & OPTION_MASK_P10_FUSION_ZERO_CYCLE) == 0)
     rs6000_isa_flags |= OPTION_MASK_P10_FUSION_ZERO_CYCLE;
 
+  /* If we enable zero cycle move fusion, also switch to absolute addresses in
+     switch tables.  */
+  if (TARGET_P10_FUSION && TARGET_P10_FUSION_ZERO_CYCLE
+      && !global_options_set.x_rs6000_relative_jumptables)
+    rs6000_relative_jumptables = 0;
+
   /* Turn off vector pair/mma options on non-power10 systems.  */
   else if (!TARGET_POWER10 && TARGET_MMA)
     {