* emit-rtl.c (init_emit): Add hard registers to regno_reg_rtx.
* combine.c (move_deaths): Use regno_reg_rtx for hard regs rather
than creating a new register.
(distribute_notes): Likewise.
* df.c (df_reg_use_gen): Likewise.
(df_reg_clobber_gen): Likewise.
(df_ref_record): Likewise.
* expr.c (use_regs): Likewise.
* flow.c (propagate_one_insn): Likewise.
(mark_set_1): Likewise.
(mark_used_reg): Likewise.
* reload.c (emit_reload_insns): Likewise.
From-SVN: r54358
+2002-06-07 Jeff Law <law@redhat.com
+
+ * emit-rtl.c (init_emit): Add hard registers to regno_reg_rtx.
+ * combine.c (move_deaths): Use regno_reg_rtx for hard regs rather
+ than creating a new register.
+ (distribute_notes): Likewise.
+ * df.c (df_reg_use_gen): Likewise.
+ (df_reg_clobber_gen): Likewise.
+ (df_ref_record): Likewise.
+ * expr.c (use_regs): Likewise.
+ * flow.c (propagate_one_insn): Likewise.
+ (mark_set_1): Likewise.
+ (mark_used_reg): Likewise.
+ * reload.c (emit_reload_insns): Likewise.
+
2002-06-07 Roger Sayle <roger@eyesopen.com>
* simplify-rtx.c (simplify_gen_relational): Simplify RTL of the form
if (i < regno || i >= ourend)
REG_NOTES (where_dead)
= gen_rtx_EXPR_LIST (REG_DEAD,
- gen_rtx_REG (reg_raw_mode[i], i),
+ regno_reg_rtx[i],
REG_NOTES (where_dead));
}
offset = 1;
for (i = regno + offset; i < ourend; i++)
- move_deaths (gen_rtx_REG (reg_raw_mode[i], i),
+ move_deaths (regno_reg_rtx[i],
maybe_kill_insn, from_cuid, to_insn, &oldnotes);
}
for (i = regno; i < endregno;
i += HARD_REGNO_NREGS (i, reg_raw_mode[i]))
{
- rtx piece = gen_rtx_REG (reg_raw_mode[i], i);
+ rtx piece = regno_reg_rtx[i];
basic_block bb = this_basic_block;
if (! dead_or_set_p (place, piece)
rtx reg;
rtx use;
- reg = regno >= FIRST_PSEUDO_REGISTER
- ? regno_reg_rtx[regno] : gen_rtx_REG (reg_raw_mode[regno], regno);
+ reg = regno_reg_rtx[regno];
use = gen_rtx_USE (GET_MODE (reg), reg);
return use;
rtx reg;
rtx use;
- reg = regno >= FIRST_PSEUDO_REGISTER
- ? regno_reg_rtx[regno] : gen_rtx_REG (reg_raw_mode[regno], regno);
+ reg = regno_reg_rtx[regno];
use = gen_rtx_CLOBBER (GET_MODE (reg), reg);
return use;
endregno = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));
for (i = regno; i < endregno; i++)
- df_ref_record_1 (df, gen_rtx_REG (reg_raw_mode[i], i),
+ df_ref_record_1 (df, regno_reg_rtx[i],
loc, insn, ref_type, ref_flags);
}
else
init_emit ()
{
struct function *f = cfun;
+ int i;
f->emit = (struct emit_status *) ggc_alloc (sizeof (struct emit_status));
first_insn = NULL;
= (tree *) ggc_alloc_cleared (f->emit->regno_pointer_align_length
* sizeof (tree));
+ /* Put copies of all the hard registers into regno_reg_rtx. */
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ regno_reg_rtx[i] = gen_raw_REG (reg_raw_mode[i], i);
+
/* Put copies of all the virtual register rtx into regno_reg_rtx. */
init_virtual_regs (f->emit);
+
/* Indicate that the virtual registers and stack locations are
all pointers. */
REG_POINTER (stack_pointer_rtx) = 1;
abort ();
for (i = 0; i < nregs; i++)
- use_reg (call_fusage, gen_rtx_REG (reg_raw_mode[regno + i], regno + i));
+ use_reg (call_fusage, regno_reg_rtx[regno + i]);
}
/* Add USE expressions to *CALL_FUSAGE for each REG contained in the
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
{
/* We do not want REG_UNUSED notes for these registers. */
- mark_set_1 (pbi, CLOBBER, gen_rtx_REG (reg_raw_mode[i], i),
- cond, insn,
+ mark_set_1 (pbi, CLOBBER, regno_reg_rtx[i], cond, insn,
pbi->flags & ~(PROP_DEATH_NOTES | PROP_REG_INFO));
}
}
so they are made live. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (global_regs[i])
- mark_used_reg (pbi, gen_rtx_REG (reg_raw_mode[i], i),
- cond, insn);
+ mark_used_reg (pbi, regno_reg_rtx[i], cond, insn);
}
}
if (! REGNO_REG_SET_P (pbi->reg_live, i))
REG_NOTES (insn)
= alloc_EXPR_LIST (REG_UNUSED,
- gen_rtx_REG (reg_raw_mode[i], i),
+ regno_reg_rtx[i],
REG_NOTES (insn));
}
}
&& ! dead_or_set_regno_p (insn, i))
REG_NOTES (insn)
= alloc_EXPR_LIST (REG_DEAD,
- gen_rtx_REG (reg_raw_mode[i], i),
+ regno_reg_rtx[i],
REG_NOTES (insn));
}
}