From: Oleg Endo Date: Wed, 25 Sep 2024 00:47:25 +0000 (+0900) Subject: SH: Switch to LRA permanently X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75a75f22f3a33e7cf04ff0f5dfa7b572d68c76c7;p=thirdparty%2Fgcc.git 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 --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index adf227efbba..c040af24470 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 2c6304790e0..abb7632a0ef 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 1ef494d4df4..d0a2a31c049 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 9546523fd65..208625cafc5 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