]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[committed] Make LRA default for ft32 and remove -mlra option
authorJeff Law <jlaw@ventanamicro.com>
Sat, 2 Nov 2024 02:28:07 +0000 (20:28 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sat, 2 Nov 2024 02:29:09 +0000 (20:29 -0600)
I was looking to clean up an old patch I'm carrying in my tester.  My first
thought was that ft32 was likely going to be deprecated because it wasn't using
LRA -- which in turn would mean the patch in question could just be removed.

But then I checked, ft32 has an LRA option and if turned on it gets the exact
same test results as with reload.  While the port mentions a failure with
sieve.c, that's been there since the port was introduced in 2015.

It's working well enough that I think just converting it is the right thing to
do.  The testsuite patch which precipitated this one will follow separately.
I've kept the -mlra option for compatibility sake, but it's ignored.

Pushing to the trunk.

gcc/
* config/ft32/ft32.cc (ft32_lra_p): Remove.
(TARGET_LRA_P): Likewise.
* config/ft32/ft32.opt: Make -mlra ignored.
* doc/invoke.texi: Adjust documentation for -mlra on ft32.

gcc/config/ft32/ft32.cc
gcc/config/ft32/ft32.opt
gcc/doc/invoke.texi

index 3c6e5fb1f6cae1c1abe4ef7f4879caca5dd0087e..80345dcdd7eb5d0c04247add58cc1a6be55c4359 100644 (file)
@@ -831,19 +831,6 @@ ft32_target_case_values_threshold (void)
   ft32_addr_space_legitimate_address_p
 
 
-// Enabling LRA gives the infamous
-//    internal compiler error: Max. number of generated reload insns per insn is achieved (90)
-// errors e.g. when compiling sieve.c
-
-static bool
-ft32_lra_p (void)
-{
-  return ft32_lra_flag;
-}
-
-#undef TARGET_LRA_P
-#define TARGET_LRA_P ft32_lra_p
-
 static bool
 reg_ok_for_base_p (rtx r, bool strict)
 {
index cecc54845e30c837454249183258ab7f1c88a719..419c82a7102ed6e8a7b486914ffdd6b13935254f 100644 (file)
@@ -23,8 +23,8 @@ Target Mask(SIM)
 Target the software simulator.
 
 mlra
-Target Var(ft32_lra_flag) Init(0) Save
-Use LRA instead of reload.
+Target RejectNegative Ignore
+Ignored, but preserved for backward compatibility.
 
 mnodiv
 Target Mask(NODIV)
index fd6c0c447096fb90b441ecd883959628e238c3a5..8d92d46eca161c74aa13a52362dad9fa90dc1208 100644 (file)
@@ -25998,8 +25998,7 @@ I/O functions are needed.
 
 @opindex mlra
 @item -mlra
-Enable Local Register Allocation.  This is still experimental for FT32,
-so by default the compiler uses standard reload.
+Does nothing.  Preserved for backward compatibility.
 
 @opindex mnodiv
 @item -mnodiv