Commit 4e812700 by Richard Henderson Committed by Richard Henderson

regrename.c (regrename_optimize): Compute nregs for each potential target register.

        * regrename.c (regrename_optimize): Compute nregs for each
        potential target register.

From-SVN: r44234
parent f7e10587
2001-07-22 Richard Henderson <rth@redhat.com>
* regrename.c (regrename_optimize): Compute nregs for each
potential target register.
2001-07-21 Neil Booth <neil@daikokuya.demon.co.uk> 2001-07-21 Neil Booth <neil@daikokuya.demon.co.uk>
Richard Henderson <rth@redhat.com> Richard Henderson <rth@redhat.com>
......
...@@ -238,8 +238,7 @@ regrename_optimize () ...@@ -238,8 +238,7 @@ regrename_optimize ()
struct du_chain *this = all_chains; struct du_chain *this = all_chains;
struct du_chain *tmp, *last; struct du_chain *tmp, *last;
HARD_REG_SET this_unavailable; HARD_REG_SET this_unavailable;
int reg = REGNO (*this->loc), treg; int reg = REGNO (*this->loc);
int nregs = HARD_REGNO_NREGS (reg, GET_MODE (*this->loc));
int i; int i;
all_chains = this->next_chain; all_chains = this->next_chain;
...@@ -287,9 +286,10 @@ regrename_optimize () ...@@ -287,9 +286,10 @@ regrename_optimize ()
/* Now potential_regs is a reasonable approximation, let's /* Now potential_regs is a reasonable approximation, let's
have a closer look at each register still in there. */ have a closer look at each register still in there. */
for (treg = 0; treg < FIRST_PSEUDO_REGISTER; treg++) for (new_reg = 0; new_reg < FIRST_PSEUDO_REGISTER; new_reg++)
{ {
new_reg = treg; int nregs = HARD_REGNO_NREGS (new_reg, GET_MODE (*this->loc));
for (i = nregs - 1; i >= 0; --i) for (i = nregs - 1; i >= 0; --i)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i) if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
|| fixed_regs[new_reg + i] || fixed_regs[new_reg + i]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment