From: Andreas Schwab <schwab@linux-m68k.org>
To: gcc-patches@gcc.gnu.org
Subject: m68k: Add -mlra
Date: Mon, 19 Aug 2024 21:45:32 +0200 [thread overview]
Message-ID: <871q2k5mar.fsf@igel.home> (raw)
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."
reply other threads:[~2024-08-19 19:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=871q2k5mar.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=gcc-patches@gcc.gnu.org \
/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).