@@ -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
@@ -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
@@ -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. */
From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> gcc/ChangeLog: 2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * 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. --- gcc/defaults.h | 4 ++++ gcc/regrename.c | 5 +---- gcc/sel-sched.c | 6 ------ 3 files changed, 5 insertions(+), 10 deletions(-)