From aedf2c028364c9e97a8480cff1a646feb5a21a63 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Tue, 28 Apr 2015 04:40:43 +0000 Subject: [PATCH] add default for HARD_REGNO_RENAME_OK gcc/ChangeLog: 2015-04-27 Trevor Saunders * defaults.h (HARD_REGNO_RENAME_OK): Add default definition to true. * regrename.c (check_new_reg_p): Remove check if HARD_REGNO_RENAME_OK is defined. * sel-sched.c (sel_hard_regno_rename_ok): Likewise. From-SVN: r222502 --- gcc/ChangeLog | 8 ++++++++ gcc/defaults.h | 4 ++++ gcc/regrename.c | 5 +---- gcc/sel-sched.c | 6 ------ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 301a63b5c54..f8ee0d7b65a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-04-27 Trevor Saunders + + * defaults.h (HARD_REGNO_RENAME_OK): Add default definition to + true. + * regrename.c (check_new_reg_p): Remove check if + HARD_REGNO_RENAME_OK is defined. + * sel-sched.c (sel_hard_regno_rename_ok): Likewise. + 2015-04-27 Trevor Saunders * calls.c (prepare_call_address): Remove ifdef NO_FUNCTION_CSE. diff --git a/gcc/defaults.h b/gcc/defaults.h index 4ae5d98ebbc..7e04be2c7a8 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1213,6 +1213,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define NO_FUNCTION_CSE false #endif +#ifndef HARD_REGNO_RENAME_OK +#define HARD_REGNO_RENAME_OK(FROM, TO) true +#endif + #ifdef GCC_INSN_FLAGS_H /* Dependent default target macro definitions diff --git a/gcc/regrename.c b/gcc/regrename.c index 147aaa89e4e..d45ad0a568a 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -333,10 +333,7 @@ check_new_reg_p (int reg ATTRIBUTE_UNUSED, int new_reg, || (crtl->is_leaf && !LEAF_REGISTERS[new_reg + i]) #endif -#ifdef HARD_REGNO_RENAME_OK - || ! HARD_REGNO_RENAME_OK (reg + i, new_reg + i) -#endif - ) + || ! HARD_REGNO_RENAME_OK (reg + i, new_reg + i)) return false; /* See whether it accepts all modes that occur in diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index 988f9d50719..9443629d260 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -1047,7 +1047,6 @@ get_reg_class (rtx_insn *insn) return NO_REGS; } -#ifdef HARD_REGNO_RENAME_OK /* Calculate HARD_REGNO_RENAME_OK data for REGNO. */ static void init_hard_regno_rename (int regno) @@ -1066,14 +1065,12 @@ init_hard_regno_rename (int regno) SET_HARD_REG_BIT (sel_hrd.regs_for_rename[regno], cur_reg); } } -#endif /* A wrapper around HARD_REGNO_RENAME_OK that will look into the hard regs data first. */ static inline bool sel_hard_regno_rename_ok (int from ATTRIBUTE_UNUSED, int to ATTRIBUTE_UNUSED) { -#ifdef HARD_REGNO_RENAME_OK /* Check whether this is all calculated. */ if (TEST_HARD_REG_BIT (sel_hrd.regs_for_rename[from], from)) return TEST_HARD_REG_BIT (sel_hrd.regs_for_rename[from], to); @@ -1081,9 +1078,6 @@ sel_hard_regno_rename_ok (int from ATTRIBUTE_UNUSED, int to ATTRIBUTE_UNUSED) init_hard_regno_rename (from); return TEST_HARD_REG_BIT (sel_hrd.regs_for_rename[from], to); -#else - return true; -#endif } /* Calculate set of registers that are capable of holding MODE. */ -- 2.30.2