Commit 6152c64a by Bernd Schmidt Committed by Bernd Schmidt

Compute REG_N_SETS for ORIGINAL_REGNOs.

From-SVN: r38547
parent 08394eef
2000-12-29 Bernd Schmidt <bernds@redhat.com>
* flow.c (PROP_POSTRELOAD): New macro.
(update_life_info): Add it to prop_flags.
(mark_set_1): If it is set, compute REG_N_SETS for the original
register number of a hard reg.
* emit-rtl.c (gen_raw_REG): New function.
(gen_rtx_REG, gen_reg_rtx, init_emit_once): Use it instead of
gen_rtx_raw_REG.
......
......@@ -168,6 +168,10 @@ Boston, MA 02111-1307, USA. */
#define EPILOGUE_USES(REGNO) 0
#endif
/* Not in basic-block.h, since it is private to this file. When set, it
causes us to keep REG_N_SETS uptodate for original pseudo registers. */
#define PROP_POSTRELOAD 64
/* The obstack on which the flow graph components are allocated. */
struct obstack flow_obstack;
......@@ -2975,6 +2979,9 @@ update_life_info (blocks, extent, prop_flags)
tmp = INITIALIZE_REG_SET (tmp_head);
if (reload_completed)
prop_flags |= PROP_POSTRELOAD;
/* For a global update, we go through the relaxation process again. */
if (extent != UPDATE_LIFE_LOCAL)
{
......@@ -4549,6 +4556,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
rtx reg, cond, insn;
int flags;
{
int orig_regno = -1;
int regno_first = -1, regno_last = -1;
int not_dead = 0;
int i;
......@@ -4586,6 +4594,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
/* Fall through. */
case REG:
orig_regno = ORIGINAL_REGNO (reg);
regno_last = regno_first = REGNO (reg);
if (regno_first < FIRST_PSEUDO_REGISTER)
regno_last += HARD_REGNO_NREGS (regno_first, GET_MODE (reg)) - 1;
......@@ -4730,7 +4739,7 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
/* Additional data to record if this is the final pass. */
if (flags & (PROP_LOG_LINKS | PROP_REG_INFO
| PROP_DEATH_NOTES | PROP_AUTOINC))
| PROP_DEATH_NOTES | PROP_AUTOINC | PROP_POSTRELOAD))
{
register rtx y;
register int blocknum = pbi->bb->index;
......@@ -4745,6 +4754,11 @@ mark_set_1 (pbi, code, reg, cond, insn, flags)
pbi->reg_next_use[i] = 0;
}
/* After reload has completed, try to keep REG_N_SETS uptodate for
the original pseudos. */
if ((flags & PROP_POSTRELOAD) && orig_regno >= FIRST_PSEUDO_REGISTER)
REG_N_SETS (orig_regno) += 1;
if (flags & PROP_REG_INFO)
{
for (i = regno_first; i <= regno_last; ++i)
......
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