From 4edd6298d853890dca6a30cfdf209e3e89a2a533 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 12 Sep 2017 13:28:27 +0000 Subject: 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 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 --- gcc/lra-assigns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/lra-assigns.c') diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index ca458ff..d9000b9 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -578,7 +578,7 @@ find_hard_regno_for_1 (int regno, int *cost, int try_only_hard_regno, hr++) SET_HARD_REG_BIT (impossible_start_hard_regs, hr); for (hr = conflict_hr - 1; - hr >= 0 && hr + hard_regno_nregs[hr][biggest_mode] > conflict_hr; + hr >= 0 && (int) end_hard_regno (biggest_mode, hr) > conflict_hr; hr--) SET_HARD_REG_BIT (impossible_start_hard_regs, hr); } -- cgit v1.1