Commit 34e56753 by Richard Stallman

*** empty log message ***

From-SVN: r204
parent 6c65299b
/* Allocate registers for pseudo-registers that span basic blocks. /* Allocate registers for pseudo-registers that span basic blocks.
Copyright (C) 1987-1991 Free Software Foundation, Inc. Copyright (C) 1987, 1988, 1991 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -394,9 +394,17 @@ global_alloc (file) ...@@ -394,9 +394,17 @@ global_alloc (file)
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_allocno[i] < 0 && reg_renumber[i] >= 0) if (reg_allocno[i] < 0 && reg_renumber[i] >= 0)
{ {
local_reg_n_refs[reg_renumber[i]] += reg_n_refs[i]; int regno = reg_renumber[i];
local_reg_live_length[reg_renumber[i]] += reg_live_length[i]; int endregno = regno + HARD_REGNO_NREGS (regno, PSEUDO_REGNO_MODE (i));
int j;
for (j = regno; j < endregno; j++)
{
local_reg_n_refs[j] += reg_n_refs[i];
local_reg_live_length[j] += reg_live_length[i];
}
} }
/* We can't override local-alloc for a reg used not just by local-alloc. */ /* We can't override local-alloc for a reg used not just by local-alloc. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (regs_ever_live[i]) if (regs_ever_live[i])
...@@ -1016,8 +1024,16 @@ find_reg (allocno, losers, all_regs_p, accept_call_clobbered, retrying) ...@@ -1016,8 +1024,16 @@ find_reg (allocno, losers, all_regs_p, accept_call_clobbered, retrying)
than it would be used by this one allocno! */ than it would be used by this one allocno! */
int k; int k;
for (k = 0; k < max_regno; k++) for (k = 0; k < max_regno; k++)
if (reg_renumber[k] == i) if (reg_renumber[k] >= 0)
reg_renumber[k] = -1; {
int regno = reg_renumber[k];
int endregno
= regno + HARD_REGNO_NREGS (regno, PSEUDO_REGNO_MODE (k));
if (i >= regno && i < endregno)
reg_renumber[k] = -1;
}
best_reg = i; best_reg = i;
break; break;
} }
......
/* Procedure integration for GNU CC. /* Procedure integration for GNU CC.
Copyright (C) 1988, 1992 Free Software Foundation, Inc. Copyright (C) 1988, 1991 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC. This file is part of GNU CC.
......
/* Prints out tree in human readable form - GNU C-compiler /* Prints out tree in human readable form - GNU C-compiler
Copyright (C) 1990 Free Software Foundation, Inc. Copyright (C) 1990, 1991 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
......
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