diff mbox series

[committed] arc: Remove mlra option [PR113954]

Message ID 20240923135645.1511753-1-claziss@gmail.com
State New
Headers show
Series [committed] arc: Remove mlra option [PR113954] | expand

Commit Message

Claudiu Zissulescu Ianculescu Sept. 23, 2024, 1:56 p.m. UTC
The target dependent mlra option was designed to be able to quickly
switch between LRA and reload.  The reload register allocator step is
scheduled for retirement, thus, remove the functionality of mlra,
keeping it for backward compatibility.

	PR target/113954

gcc/ChangeLog:

	* config/arc/arc.cc (TARGET_LRA_P): Always return true.
	(arc_lra_p): Remove.
	* config/arc/arc.h (TARGET_LRA): Remove.
	* config/arc/arc.opt (mlra): Change it to do nothing.
	* doc/invoke.texi (mlra): Update option description.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
---
 gcc/config/arc/arc.cc  | 10 +---------
 gcc/config/arc/arc.h   |  4 ----
 gcc/config/arc/arc.opt |  4 ++--
 gcc/doc/invoke.texi    |  4 +---
 4 files changed, 4 insertions(+), 18 deletions(-)

Comments

Andreas Schwab Sept. 23, 2024, 2:05 p.m. UTC | #1
On Sep 23 2024, Claudiu Zissulescu wrote:

> diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
> index c800226b179..a225adeff57 100644
> --- a/gcc/config/arc/arc.cc
> +++ b/gcc/config/arc/arc.cc
> @@ -721,7 +721,7 @@ static rtx arc_legitimize_address_0 (rtx, rtx, machine_mode mode);
>    arc_no_speculation_in_delay_slots_p
>  
>  #undef TARGET_LRA_P
> -#define TARGET_LRA_P arc_lra_p
> +#define TARGET_LRA_P hook_bool_void_true

This is the default for lra_p, so you can remove the override.
Claudiu Zissulescu Ianculescu Sept. 24, 2024, 8:27 a.m. UTC | #2
I'll include your comment in my second patch where I clean some
patterns used by reload.

Thank you,
claudiu

On Mon, Sep 23, 2024 at 5:05 PM Andreas Schwab <schwab@suse.de> wrote:
>
> On Sep 23 2024, Claudiu Zissulescu wrote:
>
> > diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
> > index c800226b179..a225adeff57 100644
> > --- a/gcc/config/arc/arc.cc
> > +++ b/gcc/config/arc/arc.cc
> > @@ -721,7 +721,7 @@ static rtx arc_legitimize_address_0 (rtx, rtx, machine_mode mode);
> >    arc_no_speculation_in_delay_slots_p
> >
> >  #undef TARGET_LRA_P
> > -#define TARGET_LRA_P arc_lra_p
> > +#define TARGET_LRA_P hook_bool_void_true
>
> This is the default for lra_p, so you can remove the override.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."
diff mbox series

Patch

diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
index c800226b179..a225adeff57 100644
--- a/gcc/config/arc/arc.cc
+++ b/gcc/config/arc/arc.cc
@@ -721,7 +721,7 @@  static rtx arc_legitimize_address_0 (rtx, rtx, machine_mode mode);
   arc_no_speculation_in_delay_slots_p
 
 #undef TARGET_LRA_P
-#define TARGET_LRA_P arc_lra_p
+#define TARGET_LRA_P hook_bool_void_true
 #define TARGET_REGISTER_PRIORITY arc_register_priority
 /* Stores with scaled offsets have different displacement ranges.  */
 #define TARGET_DIFFERENT_ADDR_DISPLACEMENT_P hook_bool_void_true
@@ -10156,14 +10156,6 @@  arc_eh_uses (int regno)
   return false;
 }
 
-/* Return true if we use LRA instead of reload pass.  */
-
-bool
-arc_lra_p (void)
-{
-  return arc_lra_flag;
-}
-
 /* ??? Should we define TARGET_REGISTER_PRIORITY?  We might perfer to
    use q registers, because some insn are shorter with them.  OTOH we
    already have separate alternatives for this purpose, and other
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 0a1ecb71d89..4cadef7a2b2 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -1660,8 +1660,4 @@  enum
 /* The default option for BI/BIH instructions.  */
 #define DEFAULT_BRANCH_INDEX 0
 
-#ifndef TARGET_LRA
-#define TARGET_LRA arc_lra_p()
-#endif
-
 #endif /* GCC_ARC_H */
diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt
index 5abb2977626..7b9318335be 100644
--- a/gcc/config/arc/arc.opt
+++ b/gcc/config/arc/arc.opt
@@ -401,8 +401,8 @@  Pass -marclinux_prof option through to linker.
 
 ;; lra is still unproven for ARC, so allow to fall back to reload with -mno-lra.
 mlra
-Target Var(arc_lra_flag) Init(1) Save
-Use LRA instead of reload.
+Target Ignore
+Does nothing.  Preserved for backward compatibility.
 
 mlra-priority-none
 Target RejectNegative Var(arc_lra_priority_tag, ARC_LRA_PRIORITY_NONE)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 032adfff5fc..7e4f0ca7a62 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -22716,9 +22716,7 @@  the case.
 
 @opindex mlra
 @item -mlra
-Enable Local Register Allocation.  This is still experimental for ARC,
-so by default the compiler uses standard reload
-(i.e.@: @option{-mno-lra}).
+Does nothing.  Preserved for backward compatibility.
 
 @opindex mlra-priority-none
 @item -mlra-priority-none