From 3417c8ddecedd1270fee3bd345ad77db4e87c32f Mon Sep 17 00:00:00 2001 From: bernds Date: Fri, 8 Apr 2005 08:27:54 +0000 Subject: [PATCH] * reload1.c (find_optional_reg, inherit_one_chain): Always use set_reload_reg to assign a register to a reload. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/reload-branch@97823 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.reload | 5 +++++ gcc/reload1.c | 20 ++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog.reload b/gcc/ChangeLog.reload index ca01a2123fa..531142f8192 100644 --- a/gcc/ChangeLog.reload +++ b/gcc/ChangeLog.reload @@ -1,3 +1,8 @@ +2005-04-08 Bernd Schmidt + + * reload1.c (find_optional_reg, inherit_one_chain): Always use + set_reload_reg to assign a register to a reload. + 2005-04-07 Bernd Schmidt * reload.c (find_reloads): Remove RELOAD_REG_P argument. All callers diff --git a/gcc/reload1.c b/gcc/reload1.c index 8506d2c6e00..b4e109bf444 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -149,7 +149,8 @@ static HARD_REG_SET *pseudo_previous_regs; static HARD_REG_SET *pseudo_forbidden_regs; /* All hard regs that have been used as spill registers for any insn are - marked in this set. */ + marked in this set. This is used to update regs_ever_live in + finish_spills. */ static HARD_REG_SET used_spill_regs; /* Nonzero if indirect addressing is supported on the machine; this means @@ -2916,11 +2917,7 @@ find_optional_reg (struct reload *rl, HARD_REG_SET *usable, int suggested, if (i == nregs) { if (do_allocate) - { - rl->nregs = nregs; - rl->reginfo.regno = suggested; - rl->reginfo.allocated = 1; - } + set_reload_reg (rl, suggested); return 1; } } @@ -2945,11 +2942,8 @@ find_optional_reg (struct reload *rl, HARD_REG_SET *usable, int suggested, return 0; if (do_allocate) - { - rl->nregs = HARD_REGNO_NREGS (best_reg, rl->mode); - rl->reginfo.regno = best_reg; - rl->reginfo.allocated = 1; - } + set_reload_reg (rl, best_reg); + return 1; } @@ -3656,9 +3650,7 @@ inherit_one_chain (struct inherit_chain *head) as above. */ /* Change the head reload to use the inheritance register. */ - head_rl->nregs = HARD_REGNO_NREGS (best_reg, head_rl->mode); - head_rl->reginfo.regno = best_reg; - head_rl->reginfo.allocated = 1; + set_reload_reg (head_rl, best_reg); /* Extend lifetime of original reload. Set the LIVE_UNTIL_END flag so that following calls to compute_birth_death will preserve this -- 2.11.4.GIT