public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* m68k: Add -mlra
@ 2024-08-19 19:45 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2024-08-19 19:45 UTC (permalink / raw)
  To: gcc-patches

	PR target/113939
	* config/m68k/m68k.opt (mlra): New target option.
	* config/m68k/m68k.cc (m68k_use_lra_p): New function.
	(TARGET_LRA_P): Use it.
	* config/m68k/m68k.opt.urls: Regenerate.
---
 gcc/config/m68k/m68k.cc       | 11 ++++++++++-
 gcc/config/m68k/m68k.opt      |  5 +++++
 gcc/config/m68k/m68k.opt.urls |  2 ++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/gcc/config/m68k/m68k.cc b/gcc/config/m68k/m68k.cc
index 22fdc723592..0e4e58a4da6 100644
--- a/gcc/config/m68k/m68k.cc
+++ b/gcc/config/m68k/m68k.cc
@@ -199,6 +199,7 @@ static machine_mode m68k_promote_function_mode (const_tree, machine_mode,
 static void m68k_asm_final_postscan_insn (FILE *, rtx_insn *insn, rtx [], int);
 static HARD_REG_SET m68k_zero_call_used_regs (HARD_REG_SET);
 static machine_mode m68k_c_mode_for_floating_type (enum tree_index);
+static bool m68k_use_lra_p (void);
 \f
 /* Initialize the GCC target structure.  */
 
@@ -307,7 +308,7 @@ static machine_mode m68k_c_mode_for_floating_type (enum tree_index);
 #endif
 
 #undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
+#define TARGET_LRA_P m68k_use_lra_p
 
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P	m68k_legitimate_address_p
@@ -7248,4 +7249,12 @@ m68k_c_mode_for_floating_type (enum tree_index ti)
   return default_mode_for_floating_type (ti);
 }
 
+/* Implement TARGET_LRA_P.  */
+
+static bool
+m68k_use_lra_p ()
+{
+  return m68k_lra_p;
+}
+
 #include "gt-m68k.h"
diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt
index b2ab41a758f..1b393f54e3c 100644
--- a/gcc/config/m68k/m68k.opt
+++ b/gcc/config/m68k/m68k.opt
@@ -146,6 +146,11 @@ mlong-jump-table-offsets
 Target RejectNegative Mask(LONG_JUMP_TABLE_OFFSETS)
 Use 32-bit offsets in jump tables rather than 16-bit offsets.
 
+mlra
+Target Var(m68k_lra_p) Undocumented
+Usa LRA for reload instead of the old reload framework.  This option is
+experimental, and it may be removed in future versions of the compiler.
+
 mnobitfield
 Target RejectNegative InverseMask(BITFIELD)
 Do not use the bit-field instructions.
diff --git a/gcc/config/m68k/m68k.opt.urls b/gcc/config/m68k/m68k.opt.urls
index 079fbf4a88e..1f1ac88bcb2 100644
--- a/gcc/config/m68k/m68k.opt.urls
+++ b/gcc/config/m68k/m68k.opt.urls
@@ -77,6 +77,8 @@ UrlSuffix(gcc/M680x0-Options.html#index-mhard-float-2)
 mlong-jump-table-offsets
 UrlSuffix(gcc/M680x0-Options.html#index-mlong-jump-table-offsets)
 
+; skipping UrlSuffix for 'mlra' due to finding no URLs
+
 mnobitfield
 UrlSuffix(gcc/M680x0-Options.html#index-mnobitfield)
 
-- 
2.46.0


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

only message in thread, other threads:[~2024-08-19 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19 19:45 m68k: Add -mlra Andreas Schwab

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