Use REG_SET macros

From-SVN: r14250
This commit is contained in:
Michael Meissner 1997-06-16 18:40:41 +00:00
parent 119f2738a6
commit 8e08106d3e
5 changed files with 12 additions and 27 deletions

View File

@ -357,8 +357,7 @@ save_call_clobbered_regs (insn_mode)
{
regset regs_live = basic_block_live_at_start[b];
rtx prev_block_last = PREV_INSN (basic_block_head[b]);
REGSET_ELT_TYPE bit;
int offset, i, j;
int i, j;
int regno;
/* Compute hard regs live at start of block -- this is the

View File

@ -740,8 +740,7 @@ set_nonzero_bits_and_sign_copies (x, set)
&& REGNO (x) >= FIRST_PSEUDO_REGISTER
/* If this register is undefined at the start of the file, we can't
say what its contents were. */
&& ! (basic_block_live_at_start[0][REGNO (x) / REGSET_ELT_BITS]
& ((REGSET_ELT_TYPE) 1 << (REGNO (x) % REGSET_ELT_BITS)))
&& ! REGNO_REG_SET_P (basic_block_live_at_start[0], REGNO (x))
&& GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
{
if (set == 0 || GET_CODE (set) == CLOBBER)
@ -2367,8 +2366,7 @@ try_combine (i3, i2, i1)
regno = REGNO (i2dest);
REG_N_SETS (regno)--;
if (REG_N_SETS (regno) == 0
&& ! (basic_block_live_at_start[0][regno / REGSET_ELT_BITS]
& ((REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS))))
&& ! REGNO_REG_SET_P (basic_block_live_at_start[0], regno))
REG_N_REFS (regno) = 0;
}
}
@ -2390,8 +2388,7 @@ try_combine (i3, i2, i1)
{
REG_N_SETS (regno)--;
if (REG_N_SETS (regno) == 0
&& ! (basic_block_live_at_start[0][regno / REGSET_ELT_BITS]
& ((REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS))))
&& ! REGNO_REG_SET_P (basic_block_live_at_start[0], regno))
REG_N_REFS (regno) = 0;
}
}
@ -10626,8 +10623,7 @@ reg_dead_at_p (reg, insn)
}
for (i = reg_dead_regno; i < reg_dead_endregno; i++)
if (basic_block_live_at_start[block][i / REGSET_ELT_BITS]
& ((REGSET_ELT_TYPE) 1 << (i % REGSET_ELT_BITS)))
if (REGNO_REG_SET_P (basic_block_live_at_start[block], i))
return 0;
return 1;

View File

@ -1181,8 +1181,7 @@ update_equiv_regs ()
&& GET_CODE (insn) == INSN
&& REG_BASIC_BLOCK (regno) < 0)
{
int l, offset;
REGSET_ELT_TYPE bit;
int l;
emit_insn_before (copy_rtx (PATTERN (equiv_insn)), insn);
REG_NOTES (PREV_INSN (insn)) = REG_NOTES (equiv_insn);
@ -1202,11 +1201,8 @@ update_equiv_regs ()
if (block >= 0 && insn == basic_block_head[block])
basic_block_head[block] = PREV_INSN (insn);
offset = regno / REGSET_ELT_BITS;
bit = ((REGSET_ELT_TYPE) 1
<< (regno % REGSET_ELT_BITS));
for (l = 0; l < n_basic_blocks; l++)
basic_block_live_at_start[l][offset] &= ~ bit;
CLEAR_REGNO_REG_SET (basic_block_live_at_start[l], regno);
}
}
}
@ -1253,11 +1249,7 @@ block_alloc (b)
/* Initialize table of hardware registers currently live. */
#ifdef HARD_REG_SET
regs_live = *basic_block_live_at_start[b];
#else
COPY_HARD_REG_SET (regs_live, basic_block_live_at_start[b]);
#endif
REG_SET_TO_HARD_REG_SET (regs_live, basic_block_live_at_start[b]);
/* This loop scans the instructions of the basic block
and assigns quantities to registers.

View File

@ -2092,9 +2092,8 @@ reload (first, global, dumpfile)
if (! frame_pointer_needed)
for (i = 0; i < n_basic_blocks; i++)
basic_block_live_at_start[i][HARD_FRAME_POINTER_REGNUM / REGSET_ELT_BITS]
&= ~ ((REGSET_ELT_TYPE) 1 << (HARD_FRAME_POINTER_REGNUM
% REGSET_ELT_BITS));
CLEAR_REGNO_REG_SET (basic_block_live_at_start[i],
HARD_FRAME_POINTER_REGNUM);
/* Come here (with failure set nonzero) if we can't get enough spill regs
and we decide not to abort about it. */

View File

@ -3436,9 +3436,8 @@ schedule_block (b, file)
if (reload_completed == 0)
{
bcopy ((char *) basic_block_live_at_start[b], (char *) bb_live_regs,
regset_bytes);
bzero ((char *) bb_dead_regs, regset_bytes);
COPY_REG_SET (bb_live_regs, basic_block_live_at_start[b]);
CLEAR_REG_SET (bb_dead_regs);
if (b == 0)
{