public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR102688-fix-frename-registers-handling)] Fix handling of flag_rename_registers.
@ 2021-10-12  8:08 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-10-12  8:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0906c8b75f6ed045a9106a96dea3d45c6cbbb7fc

commit 0906c8b75f6ed045a9106a96dea3d45c6cbbb7fc
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Oct 12 10:07:16 2021 +0200

    Fix handling of flag_rename_registers.
    
            PR target/102688
    
    gcc/ChangeLog:
    
            * common.opt: Enable flag_rename_registers by default.
            * toplev.c (process_options): Auto-detect flag_rename_registers
            only if it is not turned off in a target.

Diff:
---
 gcc/common.opt | 2 +-
 gcc/toplev.c   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/common.opt b/gcc/common.opt
index 4099effcc80..2c6be1bdd36 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2399,7 +2399,7 @@ Common Var(flag_live_range_shrinkage) Init(0) Optimization
 Relief of register pressure through live range shrinkage.
 
 frename-registers
-Common Var(flag_rename_registers) Optimization
+Common Var(flag_rename_registers) Init(1) Optimization
 Perform a register renaming optimization pass.
 
 fschedule-fusion
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 167feac2583..ee7d8854f90 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1335,7 +1335,8 @@ process_options (bool no_backend)
   if (!OPTION_SET_P (flag_web))
     flag_web = flag_unroll_loops;
 
-  if (!OPTION_SET_P (flag_rename_registers))
+  /* The option can be turned off in a target.  */
+  if (!OPTION_SET_P (flag_rename_registers) && flag_rename_registers)
     flag_rename_registers = flag_unroll_loops;
 
   if (flag_non_call_exceptions)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-12  8:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12  8:08 [gcc(refs/users/marxin/heads/PR102688-fix-frename-registers-handling)] Fix handling of flag_rename_registers Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).