add default for HARD_REGNO_RENAME_OK

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.

From-SVN: r222502
This commit is contained in:
Trevor Saunders 2015-04-28 04:40:43 +00:00 committed by Trevor Saunders
parent 1e8552c2ee
commit aedf2c0283
4 changed files with 13 additions and 10 deletions

View File

@ -1,3 +1,11 @@
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.
2015-04-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* calls.c (prepare_call_address): Remove ifdef NO_FUNCTION_CSE.

View File

@ -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

View File

@ -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

View File

@ -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. */