From: Eric Botcazou Date: Tue, 3 Jan 2017 21:13:49 +0000 (+0000) Subject: invoke.texi (SPARC options): Document -mlra as the default. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70a6dbe7e37e6920eb65a289f8725ae2fa60b28f;p=gcc.git invoke.texi (SPARC options): Document -mlra as the default. * doc/invoke.texi (SPARC options): Document -mlra as the default. * config/sparc/sparc.c (sparc_option_override): Force LRA unless -mlra/-mno-lra was passed to the compiler. From-SVN: r244034 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b31f166df7..281a4a43a07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-01-03 Eric Botcazou + + * doc/invoke.texi (SPARC options): Document -mlra as the default. + * config/sparc/sparc.c (sparc_option_override): Force LRA unless + -mlra/-mno-lra was passed to the compiler. + 2017-01-03 James Cowgill PR rtl-optimization/65618 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index ae0d0f67a72..b9213c30bcb 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1523,6 +1523,10 @@ sparc_option_override (void) if (TARGET_ARCH32) target_flags &= ~MASK_STACK_BIAS; + /* Use LRA instead of reload, unless otherwise instructed. */ + if (!(target_flags_explicit & MASK_LRA)) + target_flags |= MASK_LRA; + /* Supply a default value for align_functions. */ if (align_functions == 0 && (sparc_cpu == PROCESSOR_ULTRASPARC diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a8f8efe4e8e..f1794bc0fe6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -23271,8 +23271,8 @@ in 64-bit mode. @itemx -mno-lra @opindex mlra @opindex mno-lra -Enable Local Register Allocation. This is experimental for SPARC, so by -default the compiler uses standard reload (i.e. @option{-mno-lra}). +Enable Local Register Allocation. This is the default for SPARC since GCC 7 +so @option{-mno-lra} needs to be passed to get old Reload. @item -mcpu=@var{cpu_type} @opindex mcpu