aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2005-04-08 08:27:54 +0000
committerBernd Schmidt <bernd.schmidt@analog.com>2005-04-08 08:27:54 +0000
commit8edc405f889ea4f22163869bd53428f8981c3b17 (patch)
treeda27ab88900af44aea75a9a122dacb1b6b4cc1ae
parent753d89e2dad533b29b13508d7ac5e129d848b0c9 (diff)
* reload1.c (find_optional_reg, inherit_one_chain): Always use
set_reload_reg to assign a register to a reload. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/reload-branch@97823 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.reload5
-rw-r--r--gcc/reload1.c20
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 <bernd.schmidt@analog.com>
+
+ * 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 <bernd.schmidt@analog.com>
* 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