https://gcc.gnu.org/g:75a75f22f3a33e7cf04ff0f5dfa7b572d68c76c7

commit r17-2104-g75a75f22f3a33e7cf04ff0f5dfa7b572d68c76c7
Author: Oleg Endo <[email protected]>
Date:   Wed Sep 25 09:47:25 2024 +0900

    SH: Switch to LRA permanently
    
    gcc/ChangeLog:
    
            PR target/55212
            * config/sh/sh.opt (mlra): Ignore option but keep it around
            for compatibility.
            * config/sh/sh.cc (TARGET_LRA_P): Remove.
            (sh_lra_p): Move definition ...
            * config/sh/sh-protos.h (sh_lra_p): ... here.  Always return true.
            * doc/invoke.texi: Remove mention of -mlra for SH.

Diff:
---
 gcc/config/sh/sh-protos.h |  7 ++++++-
 gcc/config/sh/sh.cc       | 10 ----------
 gcc/config/sh/sh.opt      |  4 ++--
 gcc/doc/invoke.texi       |  9 +--------
 4 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h
index adf227efbbad..c040af244706 100644
--- a/gcc/config/sh/sh-protos.h
+++ b/gcc/config/sh/sh-protos.h
@@ -40,7 +40,12 @@ extern rtx sh_fsca_sf2int (void);
 extern rtx sh_fsca_int2sf (void);
 
 /* Declare functions defined in sh.cc and used in templates.  */
-extern bool sh_lra_p (void);
+
+/* FIXME: sh_lra_p is for transional purposes only.  Remove it eventually.  */
+inline bool sh_lra_p (void)
+{
+  return true;
+}
 
 extern const char *output_branch (int, rtx_insn *, rtx *);
 extern const char *output_ieee_ccmpeq (rtx_insn *, rtx *);
diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc
index 2c6304790e0d..abb7632a0efd 100644
--- a/gcc/config/sh/sh.cc
+++ b/gcc/config/sh/sh.cc
@@ -593,9 +593,6 @@ TARGET_GNU_ATTRIBUTES (sh_attribute_table,
 #undef  TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO     sh_encode_section_info
 
-#undef TARGET_LRA_P
-#define TARGET_LRA_P sh_lra_p
-
 #undef TARGET_SECONDARY_RELOAD
 #define TARGET_SECONDARY_RELOAD sh_secondary_reload
 
@@ -12653,13 +12650,6 @@ sh_mode_priority (int entity ATTRIBUTE_UNUSED, int n)
   Misc
 */
 
-/* Return true if we use LRA instead of reload pass.  */
-bool
-sh_lra_p (void)
-{
-  return sh_lra_flag;
-}
-
 /* Implement TARGET_USE_BY_PIECES_INFRASTRUCTURE_P.  */
 
 static bool
diff --git a/gcc/config/sh/sh.opt b/gcc/config/sh/sh.opt
index 1ef494d4df47..d0a2a31c0497 100644
--- a/gcc/config/sh/sh.opt
+++ b/gcc/config/sh/sh.opt
@@ -299,5 +299,5 @@ Target Var(TARGET_FSRRA)
 Enable the use of the fsrra instruction.
 
 mlra
-Target Var(sh_lra_flag) Init(0) Save
-Use LRA instead of reload (transitional).
+Target Ignore
+Does nothing.  Preserved for backward compatibility.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9546523fd657..208625cafc55 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1465,7 +1465,7 @@ See RS/6000 and PowerPC Options.
 -mbranch-cost=@var{num}  -mzdcbranch
 -mcbranch-force-delay-slot
 -mfsca  -mfsrra
--mpretend-cmove  -mfdpic  -mtas  -mlra}
+-mpretend-cmove  -mfdpic  -mtas}
 
 @emph{Solaris 2 Options} (@ref{Solaris 2 Options})
 @gccoptlist{-mclear-hwcap  -mno-clear-hwcap  -mimpure-text  -mno-impure-text
@@ -33989,13 +33989,6 @@ This can result in faster code on the SH4 processor.
 @itemx -mno-fdpic
 Generate code using the FDPIC ABI.
 
-@opindex mlra
-@opindex mno-lra
-@item -mlra
-@itemx -mno-lra
-Use the new LRA register allocator.  By default, the old ``reload''
-allocator is used.
-
 @end table
 
 @node Solaris 2 Options

Reply via email to