aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-07-22 00:10:46 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-07-22 00:10:46 -0700
commit4e812700ae2d64e2d6058afa4035ea9935c34dff (patch)
tree75c278eb80ff1266de00d41678bd02d49309d153 /gcc
parentf7e105877784980691334a21d667c0200444238a (diff)
downloadgcc-4e812700ae2d64e2d6058afa4035ea9935c34dff.zip
gcc-4e812700ae2d64e2d6058afa4035ea9935c34dff.tar.gz
gcc-4e812700ae2d64e2d6058afa4035ea9935c34dff.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/regrename.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66107b1..089d6b7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
Richard Henderson <rth@redhat.com>
diff --git a/gcc/regrename.c b/gcc/regrename.c
index b34e7c5..d24a695 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -238,8 +238,7 @@ regrename_optimize ()
struct du_chain *this = all_chains;
struct du_chain *tmp, *last;
HARD_REG_SET this_unavailable;
- int reg = REGNO (*this->loc), treg;
- int nregs = HARD_REGNO_NREGS (reg, GET_MODE (*this->loc));
+ int reg = REGNO (*this->loc);
int i;
all_chains = this->next_chain;
@@ -287,9 +286,10 @@ regrename_optimize ()
/* Now potential_regs is a reasonable approximation, let's
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)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
|| fixed_regs[new_reg + i]