aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-12 13:28:18 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-12 13:28:18 +0000
commit036620db8a9f9e4d807de8ba07a7004aa02a9941 (patch)
tree302e64c7ba17ddd26f1d65d47517500f88a16d27 /gcc/reload1.c
parent462a99aa98416135d2675d07d32f7ce234287983 (diff)
downloadgcc-036620db8a9f9e4d807de8ba07a7004aa02a9941.zip
gcc-036620db8a9f9e4d807de8ba07a7004aa02a9941.tar.gz
gcc-036620db8a9f9e4d807de8ba07a7004aa02a9941.tar.bz2
Make more use of END_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 are more easily (and efficiently) written as END_REGNO. 2017-09-12 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of hard_regno_nregs. * config/v850/v850.c (v850_reorg): Likewise. * reload.c (refers_to_regno_for_reload_p): Likewise. (find_equiv_reg): Likewise. * reload1.c (reload_reg_reaches_end_p): Likewise. From-SVN: r252011
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 0929951..4f39e0e 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -5349,15 +5349,13 @@ reload_reg_reaches_end_p (unsigned int regno, int reloadnum)
for (i = reloadnum + 1; i < n_reloads; i++)
{
rtx reg;
- int nregs;
if (rld[i].opnum != opnum || rld[i].when_needed != type)
continue;
reg = rld[i].reg_rtx;
if (reg == NULL_RTX)
continue;
- nregs = hard_regno_nregs[REGNO (reg)][GET_MODE (reg)];
- if (regno >= REGNO (reg) && regno < REGNO (reg) + nregs)
+ if (regno >= REGNO (reg) && regno < END_REGNO (reg))
return 0;
}