]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
SH: Switch to LRA permanently
authorOleg Endo <olegendo@gcc.gnu.org>
Wed, 25 Sep 2024 00:47:25 +0000 (09:47 +0900)
committerOleg Endo <olegendo@gcc.gnu.org>
Fri, 3 Jul 2026 01:32:55 +0000 (10:32 +0900)
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.

gcc/config/sh/sh-protos.h
gcc/config/sh/sh.cc
gcc/config/sh/sh.opt
gcc/doc/invoke.texi

index adf227efbbad4b6534a1c8c35611fc889c807b2e..c040af244706b5866ae65dbe1d3515017270542f 100644 (file)
@@ -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 *);
index 2c6304790e0ded00eca3dd2e159b53f30b7c23ac..abb7632a0efd31f8a005177fff978db7adcb3a0c 100644 (file)
@@ -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
index 1ef494d4df47fe3a6b3f63b86bbdfc11483c554c..d0a2a31c04976b69ceebf20d05678d299c3dec76 100644 (file)
@@ -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.
index 9546523fd657a9914c9db9212fa07cee628942a4..208625cafc550cfa7c5bc79760413da4ee708fcd 100644 (file)
@@ -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