summaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-12 13:28:27 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-12 13:28:27 +0000
commit4edd6298d853890dca6a30cfdf209e3e89a2a533 (patch)
treecb773aeb0a0539470b01a2b8d572da3b6dfe2742 /gcc/postreload.c
parent036620db8a9f9e4d807de8ba07a7004aa02a9941 (diff)
Make more use of end_hard_regno
An upcoming patch will convert hard_regno_nregs into an inline function, which in turn allows hard_regno_nregs to be used as the name of a targetm field. This patch rewrites uses that can use end_hard_regno instead. 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use end_hard_regno instead of hard_regno_nregs. * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise. * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise. * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise. * ira-color.c (improve_allocation): Likewise. * lra-assigns.c (find_hard_regno_for_1): Likewise. * lra-lives.c (mark_regno_live): Likewise. (mark_regno_dead): Likewise. * lra-remat.c (operand_to_remat): Likewise. * lra.c (collect_non_operand_hard_regs): Likewise. * postreload.c (reload_combine_note_store): Likewise. (move2add_valid_value_p): Likewise. * reload.c (regno_clobbered_p): Likewise. From-SVN: r252012
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 39eebf7877b..21312df0915 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -1453,7 +1453,7 @@ reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
if (GET_CODE (SET_DEST (set)) == ZERO_EXTRACT
|| GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
{
- for (i = hard_regno_nregs[regno][mode] - 1 + regno; i >= regno; i--)
+ for (i = end_hard_regno (mode, regno) - 1; i >= regno; i--)
{
reg_state[i].use_index = -1;
reg_state[i].store_ruid = reload_combine_ruid;
@@ -1462,7 +1462,7 @@ reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
}
else
{
- for (i = hard_regno_nregs[regno][mode] - 1 + regno; i >= regno; i--)
+ for (i = end_hard_regno (mode, regno) - 1; i >= regno; i--)
{
reg_state[i].store_ruid = reload_combine_ruid;
if (GET_CODE (set) == SET)
@@ -1717,8 +1717,8 @@ move2add_valid_value_p (int regno, scalar_int_mode mode)
return false;
}
- for (int i = hard_regno_nregs[regno][mode] - 1; i > 0; i--)
- if (reg_mode[regno + i] != BLKmode)
+ for (int i = end_hard_regno (mode, regno) - 1; i > regno; i--)
+ if (reg_mode[i] != BLKmode)
return false;
return true;
}