PR target/66207
* config/alpha/alpha.opt (mlra): New target option.
* config/alpha/alpha.cc (alpha_use_lra_p): New function.
(TARGET_LRA_P): Use it.
* config/alpha/alpha.opt.urls: Regenerate.

Signed-off-by: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de>
---
 gcc/config/alpha/alpha.cc       | 10 +++++++++-
 gcc/config/alpha/alpha.opt      |  5 +++++
 gcc/config/alpha/alpha.opt.urls |  2 ++
 3 files changed, 16 insertions(+), 1 deletion(-)

v2:
- Rephrase patch short summary

diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc
index 74631a41693..218c66b6090 100644
--- a/gcc/config/alpha/alpha.cc
+++ b/gcc/config/alpha/alpha.cc
@@ -9941,6 +9941,14 @@ alpha_c_mode_for_floating_type (enum tree_index ti)
   return default_mode_for_floating_type (ti);
 }
 
+/* Implement TARGET_LRA_P.  */
+
+static bool
+alpha_use_lra_p ()
+{
+  return alpha_lra_p;
+}
+
 /* Initialize the GCC target structure.  */
 #if TARGET_ABI_OPEN_VMS
 # undef TARGET_ATTRIBUTE_TABLE
@@ -10124,7 +10132,7 @@ alpha_c_mode_for_floating_type (enum tree_index ti)
 #endif
 
 #undef TARGET_LRA_P
-#define TARGET_LRA_P hook_bool_void_false
+#define TARGET_LRA_P alpha_use_lra_p
 
 #undef TARGET_LEGITIMATE_ADDRESS_P
 #define TARGET_LEGITIMATE_ADDRESS_P alpha_legitimate_address_p
diff --git a/gcc/config/alpha/alpha.opt b/gcc/config/alpha/alpha.opt
index 62543d2689c..a4d6d58724a 100644
--- a/gcc/config/alpha/alpha.opt
+++ b/gcc/config/alpha/alpha.opt
@@ -89,6 +89,11 @@ mlarge-text
 Target RejectNegative InverseMask(SMALL_TEXT)
 Emit indirect branches to local functions.
 
+mlra
+Target Var(alpha_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.
+
 mtls-kernel
 Target Mask(TLS_KERNEL)
 Emit rdval instead of rduniq for thread pointer.
diff --git a/gcc/config/alpha/alpha.opt.urls b/gcc/config/alpha/alpha.opt.urls
index a55c08328c3..916a3013f63 100644
--- a/gcc/config/alpha/alpha.opt.urls
+++ b/gcc/config/alpha/alpha.opt.urls
@@ -44,6 +44,8 @@ UrlSuffix(gcc/DEC-Alpha-Options.html#index-msmall-data)
 mlarge-data
 UrlSuffix(gcc/DEC-Alpha-Options.html#index-mlarge-data)
 
+; skipping UrlSuffix for 'mlra' due to finding no URLs
+
 msmall-text
 UrlSuffix(gcc/DEC-Alpha-Options.html#index-msmall-text)
 
-- 
2.39.5

Reply via email to