aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2015-05-19 07:08:49 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2015-05-19 07:08:49 +0000
commit53d1bae90176e1e1a605149d6bdfb9c455888289 (patch)
tree3d5e0a4f3edc366a0770e5779bd3c7fddedfd8c8 /gcc/loop-invariant.c
parent8a480dc3d0d950b6e0a1134897b0dffc26c393e4 (diff)
downloadgcc-53d1bae90176e1e1a605149d6bdfb9c455888289.zip
gcc-53d1bae90176e1e1a605149d6bdfb9c455888289.tar.gz
gcc-53d1bae90176e1e1a605149d6bdfb9c455888289.tar.bz2
cfgcleanup.c (mentions_nonequal_regs): Use END_REGNO.
gcc/ * cfgcleanup.c (mentions_nonequal_regs): Use END_REGNO. * dse.c (note_add_store): Likewise. * ira-lives.c (mark_hard_reg_dead): Likewise. * loop-invariant.c (mark_reg_store): Likewise. (mark_reg_death): Likewise. * postreload.c (reload_combine): Likewise. (reload_combine_note_store): Likewise. (reload_combine_note_use): Likewise. * recog.c (peep2_reg_dead_p): Likewise. From-SVN: r223336
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index 76a009f..1c3eae5 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -1883,8 +1883,6 @@ static void
mark_reg_store (rtx reg, const_rtx setter ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
- int regno;
-
if (GET_CODE (reg) == SUBREG)
reg = SUBREG_REG (reg);
@@ -1893,20 +1891,9 @@ mark_reg_store (rtx reg, const_rtx setter ATTRIBUTE_UNUSED,
regs_set[n_regs_set++] = reg;
- regno = REGNO (reg);
-
- if (regno >= FIRST_PSEUDO_REGISTER)
+ unsigned int end_regno = END_REGNO (reg);
+ for (unsigned int regno = REGNO (reg); regno < end_regno; ++regno)
mark_regno_live (regno);
- else
- {
- int last = regno + hard_regno_nregs[regno][GET_MODE (reg)];
-
- while (regno < last)
- {
- mark_regno_live (regno);
- regno++;
- }
- }
}
/* Mark clobbering register REG. */
@@ -1921,20 +1908,9 @@ mark_reg_clobber (rtx reg, const_rtx setter, void *data)
static void
mark_reg_death (rtx reg)
{
- int regno = REGNO (reg);
-
- if (regno >= FIRST_PSEUDO_REGISTER)
+ unsigned int end_regno = END_REGNO (reg);
+ for (unsigned int regno = REGNO (reg); regno < end_regno; ++regno)
mark_regno_death (regno);
- else
- {
- int last = regno + hard_regno_nregs[regno][GET_MODE (reg)];
-
- while (regno < last)
- {
- mark_regno_death (regno);
- regno++;
- }
- }
}
/* Mark occurrence of registers in X for the current loop. */