*** empty log message ***

From-SVN: r1474
This commit is contained in:
Charles Hannum 1992-07-06 20:11:22 +00:00
parent 906c4e36c6
commit fb3821f7b2
4 changed files with 144 additions and 110 deletions

View File

@ -709,8 +709,8 @@ push_reload (in, out, inloc, outloc, class,
|| secondary_icode != CODE_FOR_nothing
|| secondary_out_icode != CODE_FOR_nothing))
{
push_reload (0, out, 0, outloc, class, VOIDmode, outmode,
strict_low, optional, needed_for);
push_reload (NULL_RTX, out, NULL_PTR, outloc, class,
VOIDmode, outmode, strict_low, optional, needed_for);
out = 0;
outloc = 0;
outmode = VOIDmode;
@ -1292,7 +1292,7 @@ find_dummy_reload (real_in, real_out, inloc, outloc, class, for_real)
register int regno = REGNO (in) + in_offset;
int nwords = HARD_REGNO_NREGS (regno, GET_MODE (real_in));
if (! refers_to_regno_for_reload_p (regno, regno + nwords, out, 0)
if (! refers_to_regno_for_reload_p (regno, regno + nwords, out, NULL_PTR)
&& ! hard_reg_set_here_p (regno, regno + nwords,
PATTERN (this_insn)))
{
@ -1472,6 +1472,11 @@ operands_match_p (x, y)
int val;
switch (fmt[i])
{
case 'w':
if (XWINT (x, i) != XWINT (y, i))
return 0;
break;
case 'i':
if (XINT (x, i) != XINT (y, i))
return 0;
@ -1518,8 +1523,8 @@ struct decomposition
int reg_flag;
int safe;
rtx base;
int start;
int end;
HOST_WIDE_INT start;
HOST_WIDE_INT end;
};
/* Describe the range of registers or memory referenced by X.
@ -1662,7 +1667,7 @@ immune_p (x, y, ydata)
struct decomposition xdata;
if (ydata.reg_flag)
return !refers_to_regno_for_reload_p (ydata.start, ydata.end, x, 0);
return !refers_to_regno_for_reload_p (ydata.start, ydata.end, x, NULL_PTR);
if (ydata.safe)
return 1;
@ -1970,7 +1975,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
if (constraints[i][0] == 'p')
{
find_reloads_address (VOIDmode, 0,
find_reloads_address (VOIDmode, NULL_PTR,
recog_operand[i], recog_operand_loc[i],
recog_operand[i], ind_levels);
substed_operand[i] = recog_operand[i] = *recog_operand_loc[i];
@ -2343,7 +2348,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
/* Match any floating double constant, but only if
we can examine the bits of it reliably. */
if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
|| HOST_BITS_PER_INT != BITS_PER_WORD)
|| HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
&& GET_MODE (operand) != VOIDmode && ! flag_pretend_float)
break;
if (GET_CODE (operand) == CONST_DOUBLE)
@ -2790,10 +2795,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
&& GET_CODE (recog_operand[i]) == MEM)
{
operand_reloadnum[i]
= push_reload (XEXP (recog_operand[i], 0), 0,
&XEXP (recog_operand[i], 0), 0,
= push_reload (XEXP (recog_operand[i], 0), NULL_RTX,
&XEXP (recog_operand[i], 0), NULL_PTR,
BASE_REG_CLASS, GET_MODE (XEXP (recog_operand[i], 0)),
VOIDmode, 0, 0, 0);
VOIDmode, 0, 0, NULL_RTX);
reload_inc[operand_reloadnum[i]]
= GET_MODE_SIZE (GET_MODE (recog_operand[i]));
}
@ -2808,7 +2813,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
(modified[i] == RELOAD_READ ? VOIDmode : operand_mode[i]),
(insn_code_number < 0 ? 0
: insn_operand_strict_low[insn_code_number][i]),
0, 0);
0, NULL_RTX);
/* In a matching pair of operands, one must be input only
and the other must be output only.
Pass the input operand as IN and the other as OUT. */
@ -2823,7 +2828,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
(enum reg_class) goal_alternative[i],
operand_mode[i],
operand_mode[goal_alternative_matched[i]],
0, 0, 0);
0, 0, NULL_RTX);
operand_reloadnum[goal_alternative_matched[i]] = output_reloadnum;
}
else if (modified[i] == RELOAD_WRITE
@ -2837,7 +2842,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
(enum reg_class) goal_alternative[i],
operand_mode[goal_alternative_matched[i]],
operand_mode[i],
0, 0, 0);
0, 0, NULL_RTX);
operand_reloadnum[i] = output_reloadnum;
}
else if (insn_code_number >= 0)
@ -2881,7 +2886,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
(modified[i] == RELOAD_READ ? VOIDmode : operand_mode[i]),
(insn_code_number < 0 ? 0
: insn_operand_strict_low[insn_code_number][i]),
1, 0);
1, NULL_RTX);
/* Make an optional reload for an explicit mem ref. */
else if (GET_CODE (operand) == MEM
&& (enum reg_class) goal_alternative[i] != NO_REGS
@ -2899,7 +2904,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
(modified[i] == RELOAD_READ ? VOIDmode : operand_mode[i]),
(insn_code_number < 0 ? 0
: insn_operand_strict_low[insn_code_number][i]),
1, 0);
1, NULL_RTX);
else
non_reloaded_operands[n_non_reloaded_operands++] = recog_operand[i];
}
@ -3000,7 +3005,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
/* Now get the operand values out of the insn. */
decode_asm_operands (body, recog_operand, recog_operand_loc, 0, 0);
decode_asm_operands (body, recog_operand, recog_operand_loc,
NULL_PTR, NULL_PTR);
break;
}
@ -3023,7 +3029,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
if (insn_code_number >= 0)
if (insn_operand_address_p[insn_code_number][i])
find_reloads_address (VOIDmode, 0,
find_reloads_address (VOIDmode, NULL_PTR,
recog_operand[i], recog_operand_loc[i],
recog_operand[i], ind_levels);
if (code == MEM)
@ -3191,7 +3197,7 @@ find_reloads_toplev (x, ind_levels, is_set_dest)
x = gen_rtx (MEM, GET_MODE (x), addr);
RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (regno_reg_rtx[regno]);
find_reloads_address (GET_MODE (x), 0,
find_reloads_address (GET_MODE (x), NULL_PTR,
XEXP (x, 0),
&XEXP (x, 0), x, ind_levels);
}
@ -3274,7 +3280,7 @@ find_reloads_toplev (x, ind_levels, is_set_dest)
addr = plus_constant (addr, offset);
x = gen_rtx (MEM, GET_MODE (x), addr);
RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (regno_reg_rtx[regno]);
find_reloads_address (GET_MODE (x), 0,
find_reloads_address (GET_MODE (x), NULL_PTR,
XEXP (x, 0),
&XEXP (x, 0), x, ind_levels);
}
@ -3362,9 +3368,9 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels)
else if (reg_equiv_address[regno] != 0)
{
tem = make_memloc (ad, regno);
find_reloads_address (GET_MODE (tem), 0, XEXP (tem, 0),
find_reloads_address (GET_MODE (tem), NULL_PTR, XEXP (tem, 0),
&XEXP (tem, 0), operand, ind_levels);
push_reload (tem, 0, loc, 0, BASE_REG_CLASS,
push_reload (tem, NULL_RTX, loc, NULL_PTR, BASE_REG_CLASS,
GET_MODE (ad), VOIDmode, 0, 0,
operand);
return 1;
@ -3399,7 +3405,7 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels)
return 0;
/* If we do not have one of the cases above, we must do the reload. */
push_reload (ad, 0, loc, 0, BASE_REG_CLASS,
push_reload (ad, NULL_RTX, loc, NULL_PTR, BASE_REG_CLASS,
GET_MODE (ad), VOIDmode, 0, 0, operand);
return 1;
}
@ -3458,7 +3464,7 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels)
{
/* Must use TEM here, not AD, since it is the one that will
have any subexpressions reloaded, if needed. */
push_reload (tem, 0, loc, 0,
push_reload (tem, NULL_RTX, loc, NULL_PTR,
BASE_REG_CLASS, GET_MODE (tem), VOIDmode, 0,
0, operand);
return 1;
@ -3913,7 +3919,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
register rtx link;
int reloadnum
= push_reload (x, 0, loc, 0,
= push_reload (x, NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), GET_MODE (x), VOIDmode, 0, operand);
reload_inc[reloadnum]
@ -3953,7 +3959,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
XEXP (XEXP (x, 0), 0), &XEXP (XEXP (x, 0), 0),
operand, ind_levels);
reloadnum = push_reload (x, 0, loc, 0,
reloadnum = push_reload (x, NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
reload_inc[reloadnum]
@ -3983,7 +3989,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
find_reloads_address (GET_MODE (x), loc, XEXP (x, 0), &XEXP (x, 0),
operand, ind_levels);
push_reload (*loc, 0, loc, 0,
push_reload (*loc, NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
return 1;
@ -3994,7 +4000,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
if (reg_equiv_constant[regno] != 0)
{
push_reload (reg_equiv_constant[regno], 0, loc, 0,
push_reload (reg_equiv_constant[regno], NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
return 1;
@ -4004,7 +4010,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
that feeds this insn. */
if (reg_equiv_mem[regno] != 0)
{
push_reload (reg_equiv_mem[regno], 0, loc, 0,
push_reload (reg_equiv_mem[regno], NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
return 1;
@ -4023,7 +4029,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
|| !(context ? REGNO_OK_FOR_INDEX_P (regno)
: REGNO_OK_FOR_BASE_P (regno))))
{
push_reload (x, 0, loc, 0,
push_reload (x, NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
return 1;
@ -4035,7 +4041,7 @@ find_reloads_address_1 (x, context, loc, operand, ind_levels)
from before this insn to after it. */
if (regno_clobbered_p (regno, this_insn))
{
push_reload (x, 0, loc, 0,
push_reload (x, NULL_RTX, loc, NULL_PTR,
context ? INDEX_REG_CLASS : BASE_REG_CLASS,
GET_MODE (x), VOIDmode, 0, 0, operand);
return 1;
@ -4101,7 +4107,8 @@ find_reloads_address_part (x, loc, class, mode, needed_for, ind_levels)
needed_for, ind_levels);
}
push_reload (x, 0, loc, 0, class, mode, VOIDmode, 0, 0, needed_for);
push_reload (x, NULL_RTX, loc, NULL_PTR, class,
mode, VOIDmode, 0, 0, needed_for);
}
/* Substitute into X the registers into which we have reloaded
@ -4270,7 +4277,8 @@ refers_to_regno_for_reload_p (regno, endregno, x, loc)
{
if (reg_equiv_memory_loc[i])
return refers_to_regno_for_reload_p (regno, endregno,
reg_equiv_memory_loc[i], 0);
reg_equiv_memory_loc[i],
NULL_PTR);
if (reg_equiv_constant[i])
return 0;
@ -4402,7 +4410,7 @@ reg_overlap_mentioned_for_reload_p (x, in)
endregno = regno + (regno < FIRST_PSEUDO_REGISTER
? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1);
return refers_to_regno_for_reload_p (regno, endregno, in, 0);
return refers_to_regno_for_reload_p (regno, endregno, in, NULL_PTR);
}
/* Return nonzero if anything in X contains a MEM. Look also for pseudo
@ -4624,10 +4632,12 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
/* If we are looking for a constant,
and something equivalent to that constant was copied
into a reg, we can use that reg. */
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV, 0))
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV,
NULL_RTX))
&& rtx_equal_p (XEXP (tem, 0), goal)
&& (valueno = true_regnum (valtry = SET_DEST (pat))) >= 0)
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV, 0))
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV,
NULL_RTX))
&& GET_CODE (SET_DEST (pat)) == REG
&& GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) == MODE_FLOAT
@ -4636,7 +4646,8 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& (valtry = operand_subword (SET_DEST (pat), 0, 0,
VOIDmode))
&& (valueno = true_regnum (valtry)) >= 0)
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV, 0))
|| (goal_const && (tem = find_reg_note (p, REG_EQUIV,
NULL_RTX))
&& GET_CODE (SET_DEST (pat)) == REG
&& GET_CODE (XEXP (tem, 0)) == CONST_DOUBLE
&& GET_MODE_CLASS (GET_MODE (XEXP (tem, 0))) == MODE_FLOAT
@ -4687,7 +4698,7 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
&& refers_to_regno_for_reload_p (valueno,
(valueno
+ HARD_REGNO_NREGS (valueno, mode)),
goal, 0))
goal, NULL_PTR))
return 0;
/* Reject registers that overlap GOAL. */

View File

@ -348,7 +348,7 @@ init_reload ()
= gen_rtx (MEM, Pmode,
gen_rtx (PLUS, Pmode,
gen_rtx (REG, Pmode, LAST_VIRTUAL_REGISTER + 1),
gen_rtx (CONST_INT, VOIDmode, 4)));
GEN_INT (4)));
spill_indirect_levels = 0;
while (memory_address_p (QImode, tem))
@ -536,7 +536,7 @@ reload (first, global, dumpfile)
/* Make sure that the last insn in the chain
is not something that needs reloading. */
emit_note (0, NOTE_INSN_DELETED);
emit_note (NULL_PTR, NOTE_INSN_DELETED);
/* Find all the pseudo registers that didn't get hard regs
but do have known equivalent constants or memory slots.
@ -571,7 +571,7 @@ reload (first, global, dumpfile)
if (set != 0 && GET_CODE (SET_DEST (set)) == REG)
{
rtx note = find_reg_note (insn, REG_EQUIV, 0);
rtx note = find_reg_note (insn, REG_EQUIV, NULL_RTX);
if (note
#ifdef LEGITIMATE_PIC_OPERAND_P
&& (! CONSTANT_P (XEXP (note, 0)) || ! flag_pic
@ -836,7 +836,7 @@ reload (first, global, dumpfile)
for (x = forced_labels; x; x = XEXP (x, 1))
if (XEXP (x, 0))
set_label_offsets (XEXP (x, 0), 0, 1);
set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
/* For each pseudo register that has an equivalent location defined,
try to eliminate any eliminable registers (such as the frame pointer)
@ -864,7 +864,7 @@ reload (first, global, dumpfile)
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_renumber[i] < 0 && reg_equiv_memory_loc[i])
{
rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, 0);
rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, NULL_RTX);
if (strict_memory_address_p (GET_MODE (regno_reg_rtx[i]),
XEXP (x, 0)))
@ -1596,7 +1596,7 @@ reload (first, global, dumpfile)
}
else
something_changed
|= new_spill_reg (i, class, max_needs, 0,
|= new_spill_reg (i, class, max_needs, NULL_PTR,
global, dumpfile);
}
else
@ -1637,7 +1637,8 @@ reload (first, global, dumpfile)
}
else
something_changed
|= new_spill_reg (idx, class, max_needs, 0,
|= new_spill_reg (idx, class,
max_needs, NULL_PTR,
global, dumpfile);
}
@ -2452,7 +2453,8 @@ eliminate_regs (x, mem_mode, insn)
elimination) and ignore the fact that this is actually a
reference to the pseudo. Ensure we make a copy of the
address in case it is shared. */
new = eliminate_regs (reg_equiv_memory_loc[regno], mem_mode, 0);
new = eliminate_regs (reg_equiv_memory_loc[regno],
mem_mode, NULL_RTX);
if (new != reg_equiv_memory_loc[regno])
return copy_rtx (new);
}
@ -2508,8 +2510,8 @@ eliminate_regs (x, mem_mode, insn)
reload. This is the desired action. */
{
rtx new0 = eliminate_regs (XEXP (x, 0), mem_mode, 0);
rtx new1 = eliminate_regs (XEXP (x, 1), mem_mode, 0);
rtx new0 = eliminate_regs (XEXP (x, 0), mem_mode, NULL_RTX);
rtx new1 = eliminate_regs (XEXP (x, 1), mem_mode, NULL_RTX);
if (new0 != XEXP (x, 0) || new1 != XEXP (x, 1))
{
@ -2546,7 +2548,7 @@ eliminate_regs (x, mem_mode, insn)
/* If we have something in XEXP (x, 0), the usual case, eliminate it. */
if (XEXP (x, 0))
{
new = eliminate_regs (XEXP (x, 0), mem_mode, 0);
new = eliminate_regs (XEXP (x, 0), mem_mode, NULL_RTX);
if (new != XEXP (x, 0))
x = gen_rtx (EXPR_LIST, REG_NOTE_KIND (x), new, XEXP (x, 1));
}
@ -2559,7 +2561,7 @@ eliminate_regs (x, mem_mode, insn)
strictly needed, but it simplifies the code. */
if (XEXP (x, 1))
{
new = eliminate_regs (XEXP (x, 1), mem_mode, 0);
new = eliminate_regs (XEXP (x, 1), mem_mode, NULL_RTX);
if (new != XEXP (x, 1))
return gen_rtx (INSN_LIST, GET_MODE (x), XEXP (x, 0), new);
}
@ -2578,8 +2580,9 @@ eliminate_regs (x, mem_mode, insn)
case GE: case GT: case GEU: case GTU:
case LE: case LT: case LEU: case LTU:
{
rtx new0 = eliminate_regs (XEXP (x, 0), mem_mode, 0);
rtx new1 = XEXP (x, 1) ? eliminate_regs (XEXP (x, 1), mem_mode, 0) : 0;
rtx new0 = eliminate_regs (XEXP (x, 0), mem_mode, NULL_RTX);
rtx new1
= XEXP (x, 1) ? eliminate_regs (XEXP (x, 1), mem_mode, NULL_RTX) : 0;
if (new0 != XEXP (x, 0) || new1 != XEXP (x, 1))
return gen_rtx (code, GET_MODE (x), new0, new1);
@ -2610,7 +2613,7 @@ eliminate_regs (x, mem_mode, insn)
case ABS:
case SQRT:
case FFS:
new = eliminate_regs (XEXP (x, 0), mem_mode, 0);
new = eliminate_regs (XEXP (x, 0), mem_mode, NULL_RTX);
if (new != XEXP (x, 0))
return gen_rtx (code, GET_MODE (x), new);
return x;
@ -2629,7 +2632,7 @@ eliminate_regs (x, mem_mode, insn)
&& reg_equiv_memory_loc[REGNO (SUBREG_REG (x))] != 0)
{
new = eliminate_regs (reg_equiv_memory_loc[REGNO (SUBREG_REG (x))],
mem_mode, 0);
mem_mode, NULL_RTX);
/* If we didn't change anything, we must retain the pseudo. */
if (new == reg_equiv_memory_loc[REGNO (SUBREG_REG (x))])
@ -2640,7 +2643,7 @@ eliminate_regs (x, mem_mode, insn)
new = copy_rtx (new);
}
else
new = eliminate_regs (SUBREG_REG (x), mem_mode, 0);
new = eliminate_regs (SUBREG_REG (x), mem_mode, NULL_RTX);
if (new != XEXP (x, 0))
{
@ -2690,7 +2693,7 @@ eliminate_regs (x, mem_mode, insn)
temp_vec = (rtx *) alloca (XVECLEN (x, 3) * sizeof (rtx));
for (i = 0; i < ASM_OPERANDS_INPUT_LENGTH (x); i++)
temp_vec[i] = eliminate_regs (ASM_OPERANDS_INPUT (x, i),
mem_mode, 0);
mem_mode, NULL_RTX);
for (i = 0; i < ASM_OPERANDS_INPUT_LENGTH (x); i++)
if (temp_vec[i] != ASM_OPERANDS_INPUT (x, i))
@ -2760,8 +2763,8 @@ eliminate_regs (x, mem_mode, insn)
/* Now avoid the loop below in this common case. */
{
rtx new0 = eliminate_regs (SET_DEST (x), 0, 0);
rtx new1 = eliminate_regs (SET_SRC (x), 0, 0);
rtx new0 = eliminate_regs (SET_DEST (x), 0, NULL_RTX);
rtx new1 = eliminate_regs (SET_SRC (x), 0, NULL_RTX);
/* If SET_DEST changed from a REG to a MEM and INSN is non-zero,
write a CLOBBER insn. */
@ -2779,7 +2782,7 @@ eliminate_regs (x, mem_mode, insn)
/* Our only special processing is to pass the mode of the MEM to our
recursive call and copy the flags. While we are here, handle this
case more efficiently. */
new = eliminate_regs (XEXP (x, 0), GET_MODE (x), 0);
new = eliminate_regs (XEXP (x, 0), GET_MODE (x), NULL_RTX);
if (new != XEXP (x, 0))
{
new = gen_rtx (MEM, GET_MODE (x), new);
@ -2799,7 +2802,7 @@ eliminate_regs (x, mem_mode, insn)
{
if (*fmt == 'e')
{
new = eliminate_regs (XEXP (x, i), mem_mode, 0);
new = eliminate_regs (XEXP (x, i), mem_mode, NULL_RTX);
if (new != XEXP (x, i) && ! copied)
{
rtx new_x = rtx_alloc (code);
@ -2921,7 +2924,7 @@ eliminate_regs_in_insn (insn, replace)
but now can do this as a load-address. This saves an insn in this
common case. */
new_body = eliminate_regs (old_body, 0, replace ? insn : 0);
new_body = eliminate_regs (old_body, 0, replace ? insn : NULL_RTX);
if (new_body != old_body)
{
if (GET_CODE (old_body) != SET || GET_CODE (SET_SRC (old_body)) != PLUS
@ -2929,7 +2932,7 @@ eliminate_regs_in_insn (insn, replace)
PATTERN (insn) = new_body;
if (replace && REG_NOTES (insn))
REG_NOTES (insn) = eliminate_regs (REG_NOTES (insn), 0, 0);
REG_NOTES (insn) = eliminate_regs (REG_NOTES (insn), 0, NULL_RTX);
val = 1;
}
@ -3376,7 +3379,7 @@ reload_as_needed (first, live_known)
&& GET_CODE (XEXP (PATTERN (insn), 0)) == MEM)
XEXP (XEXP (PATTERN (insn), 0), 0)
= eliminate_regs (XEXP (XEXP (PATTERN (insn), 0), 0),
GET_MODE (XEXP (PATTERN (insn), 0)), 0);
GET_MODE (XEXP (PATTERN (insn), 0)), NULL_RTX);
/* If we need to do register elimination processing, do so.
This might delete the insn, in which case we are done. */
@ -4347,7 +4350,7 @@ choose_reload_regs (insn, avoid_return_reg)
{
register rtx equiv
= find_equiv_reg (reload_in[r], insn, reload_reg_class[r],
-1, 0, 0, reload_mode[r]);
-1, NULL_PTR, 0, reload_mode[r]);
int regno;
if (equiv != 0)
@ -4677,7 +4680,7 @@ emit_reload_insns (insn)
oldequiv
= find_equiv_reg (old, insn,
reload_reg_class[reload_secondary_reload[j]],
-1, 0, 0, mode);
-1, NULL_PTR, 0, mode);
#endif
/* If reloading from memory, see if there is a register
@ -4694,7 +4697,7 @@ emit_reload_insns (insn)
&& REGNO (old) >= FIRST_PSEUDO_REGISTER
&& reg_renumber[REGNO (old)] < 0)))
oldequiv = find_equiv_reg (old, insn, GENERAL_REGS,
-1, 0, 0, mode);
-1, NULL_PTR, 0, mode);
if (oldequiv)
{
@ -5759,7 +5762,7 @@ inc_for_reload (reloadreg, value, inc_amount, insn)
if (GET_CODE (value) == PRE_DEC || GET_CODE (value) == POST_DEC)
inc_amount = - inc_amount;
inc = gen_rtx (CONST_INT, VOIDmode, inc_amount);
inc = GEN_INT (inc_amount);
/* If this is post-increment, first copy the location to the reload reg. */
if (post)
@ -5817,9 +5820,7 @@ inc_for_reload (reloadreg, value, inc_amount, insn)
emit_insn_before (gen_add2_insn (reloadreg, inc), insn);
emit_insn_before (gen_move_insn (incloc, reloadreg), insn);
emit_insn_before (gen_add2_insn (reloadreg,
gen_rtx (CONST_INT, VOIDmode,
-inc_amount)),
emit_insn_before (gen_add2_insn (reloadreg, GEN_INT (-inc_amount)),
insn);
}

View File

@ -766,7 +766,7 @@ add_to_delay_list (insn, delay_list)
{
/* If we have an empty list, just make a new list element. */
if (delay_list == 0)
return gen_rtx (INSN_LIST, VOIDmode, insn, 0);
return gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX);
/* Otherwise this must be an INSN_LIST. Add INSN to the end of the
list. */
@ -845,14 +845,14 @@ delete_scheduled_jump (insn)
#ifdef HAVE_cc0
if (reg_mentioned_p (cc0_rtx, insn))
{
rtx note = find_reg_note (insn, REG_CC_SETTER, 0);
rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
/* If a reg-note was found, it points to an insn to set CC0. This
insn is in the delay list of some other insn. So delete it from
the delay list it was in. */
if (note)
{
if (! FIND_REG_INC_NOTE (XEXP (note, 0), 0)
if (! FIND_REG_INC_NOTE (XEXP (note, 0), NULL_RTX)
&& sets_cc0_p (PATTERN (XEXP (note, 0))) == 1)
delete_from_delay_slot (XEXP (note, 0));
}
@ -972,7 +972,7 @@ optimize_skip (insn)
return 0;
}
delay_list = add_to_delay_list (trial, 0);
delay_list = add_to_delay_list (trial, NULL_RTX);
next_trial = next_active_insn (trial);
update_block (trial, trial);
delete_insn (trial);
@ -1201,7 +1201,7 @@ steal_delay_list_from_target (insn, condition, seq, delay_list,
#ifdef HAVE_cc0
/* If TRIAL sets CC0, we can't copy it, so we can't steal this
delay list. */
|| find_reg_note (trial, REG_CC_USER, 0)
|| find_reg_note (trial, REG_CC_USER, NULL_RTX)
#endif
/* If TRIAL is from the fallthrough code of an annulled branch insn
in SEQ, we cannot use it. */
@ -1942,7 +1942,8 @@ mark_target_live_regs (target, res)
if (b != -1)
{
regset regs_live = basic_block_live_at_start[b];
int offset, bit, j;
int offset, j;
REGSET_ELT_TYPE bit;
int regno;
rtx start_insn, stop_insn;
@ -1959,7 +1960,7 @@ mark_target_live_regs (target, res)
for (offset = 0, i = 0; offset < regset_size; offset++)
{
if (regs_live[offset] == 0)
i += HOST_BITS_PER_INT;
i += REGSET_ELT_BITS;
else
for (bit = 1; bit && i < max_regno; bit <<= 1, i++)
if ((regs_live[offset] & bit)
@ -2901,7 +2902,7 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
if (thread_if_true)
INSN_FROM_TARGET_P (ninsn) = 1;
delay_list = add_to_delay_list (ninsn, 0);
delay_list = add_to_delay_list (ninsn, NULL_RTX);
(*pslots_filled)++;
}
}
@ -2998,7 +2999,7 @@ fill_eager_delay_slots (first)
else
{
fallthrough_insn = next_active_insn (insn);
own_fallthrough = own_thread_p (NEXT_INSN (insn), 0, 1);
own_fallthrough = own_thread_p (NEXT_INSN (insn), NULL_RTX, 1);
prediction = mostly_true_jump (insn, condition);
}
@ -3248,7 +3249,7 @@ relax_delay_slots (first)
put it back where it belonged and delete the register notes,
but it doesn't seem worthwhile in this uncommon case. */
&& ! find_reg_note (XVECEXP (pat, 0, XVECLEN (pat, 0) - 1),
REG_CC_USER, 0)
REG_CC_USER, NULL_RTX)
#endif
)
{
@ -3369,7 +3370,7 @@ make_return_insns (first)
/* If we can't make the jump into a RETURN, redirect it to the best
RETURN and go on to the next insn. */
if (! redirect_jump (jump_insn, 0))
if (! redirect_jump (jump_insn, NULL_RTX))
{
redirect_jump (jump_insn, real_return_label);
continue;

View File

@ -284,7 +284,7 @@ init_alias_analysis ()
&& REGNO (SET_DEST (set)) >= FIRST_PSEUDO_REGISTER
&& (((note = find_reg_note (insn, REG_EQUAL, 0)) != 0
&& reg_n_sets[REGNO (SET_DEST (set))] == 1)
|| (note = find_reg_note (insn, REG_EQUIV, 0)) != 0)
|| (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != 0)
&& GET_CODE (XEXP (note, 0)) != EXPR_LIST)
reg_known_value[REGNO (SET_DEST (set))] = XEXP (note, 0);
@ -346,6 +346,11 @@ rtx_equal_for_memref_p (x, y)
{
switch (fmt[i])
{
case 'w':
if (XWINT (x, i) != XWINT (y, i))
return 0;
break;
case 'n':
case 'i':
if (XINT (x, i) != XINT (y, i))
@ -449,7 +454,7 @@ static int
memrefs_conflict_p (xsize, x, ysize, y, c)
rtx x, y;
int xsize, ysize;
int c;
HOST_WIDE_INT c;
{
if (GET_CODE (x) == HIGH)
x = XEXP (x, 0);
@ -1670,7 +1675,8 @@ sched_note_set (b, x, death)
if (regno >= FIRST_PSEUDO_REGISTER || ! global_regs[regno])
{
register int offset = regno / REGSET_ELT_BITS;
register int bit = 1 << (regno % REGSET_ELT_BITS);
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS);
if (death)
{
@ -1686,7 +1692,7 @@ sched_note_set (b, x, death)
while (--j >= 0)
{
offset = (regno + j) / REGSET_ELT_BITS;
bit = 1 << ((regno + j) % REGSET_ELT_BITS);
bit = (REGSET_ELT_TYPE) 1 << ((regno + j) % REGSET_ELT_BITS);
bb_live_regs[offset] &= ~bit;
bb_dead_regs[offset] |= bit;
@ -1707,7 +1713,7 @@ sched_note_set (b, x, death)
while (--j >= 0)
{
offset = (regno + j) / REGSET_ELT_BITS;
bit = 1 << ((regno + j) % REGSET_ELT_BITS);
bit = (REGSET_ELT_TYPE) 1 << ((regno + j) % REGSET_ELT_BITS);
bb_live_regs[offset] |= bit;
bb_dead_regs[offset] &= ~bit;
@ -1835,7 +1841,7 @@ birthing_insn_p (pat)
rtx dest = SET_DEST (pat);
int i = REGNO (dest);
int offset = i / REGSET_ELT_BITS;
int bit = 1 << (i % REGSET_ELT_BITS);
REGSET_ELT_TYPE bit = (REGSET_ELT_TYPE) 1 << (i % REGSET_ELT_BITS);
/* It would be more accurate to use refers_to_regno_p or
reg_mentioned_p to determine when the dest is not live before this
@ -2015,9 +2021,10 @@ attach_deaths (x, insn, set_p)
register int regno = REGNO (x);
register int offset = regno / REGSET_ELT_BITS;
register int bit = 1 << (regno % REGSET_ELT_BITS);
int all_needed = (old_live_regs[offset] & bit);
int some_needed = (old_live_regs[offset] & bit);
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS);
REGSET_ELT_TYPE all_needed = (old_live_regs[offset] & bit);
REGSET_ELT_TYPE some_needed = (old_live_regs[offset] & bit);
if (set_p)
return;
@ -2030,9 +2037,11 @@ attach_deaths (x, insn, set_p)
while (--n > 0)
{
some_needed |= (old_live_regs[(regno + n) / REGSET_ELT_BITS]
& 1 << ((regno + n) % REGSET_ELT_BITS));
& ((REGSET_ELT_TYPE) 1
<< ((regno + n) % REGSET_ELT_BITS)));
all_needed &= (old_live_regs[(regno + n) / REGSET_ELT_BITS]
& 1 << ((regno + n) % REGSET_ELT_BITS));
& ((REGSET_ELT_TYPE) 1
<< ((regno + n) % REGSET_ELT_BITS)));
}
}
@ -2077,7 +2086,8 @@ attach_deaths (x, insn, set_p)
for (i = HARD_REGNO_NREGS (regno, GET_MODE (x)) - 1;
i >= 0; i--)
if ((old_live_regs[(regno + i) / REGSET_ELT_BITS]
& 1 << ((regno +i) % REGSET_ELT_BITS)) == 0
& ((REGSET_ELT_TYPE) 1
<< ((regno +i) % REGSET_ELT_BITS))) == 0
&& ! dead_or_set_regno_p (insn, regno + i))
create_reg_dead_note (gen_rtx (REG, word_mode,
regno + i),
@ -2092,7 +2102,8 @@ attach_deaths (x, insn, set_p)
while (--j >= 0)
{
offset = (regno + j) / REGSET_ELT_BITS;
bit = 1 << ((regno + j) % REGSET_ELT_BITS);
bit
= (REGSET_ELT_TYPE) 1 << ((regno + j) % REGSET_ELT_BITS);
bb_dead_regs[offset] &= ~bit;
bb_live_regs[offset] |= bit;
@ -2623,7 +2634,8 @@ schedule_block (b, file)
{
register int regno = REGNO (XEXP (link, 0));
register int offset = regno / REGSET_ELT_BITS;
register int bit = 1 << (regno % REGSET_ELT_BITS);
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS);
if (regno < FIRST_PSEUDO_REGISTER)
{
@ -2632,7 +2644,8 @@ schedule_block (b, file)
while (--j >= 0)
{
offset = (regno + j) / REGSET_ELT_BITS;
bit = 1 << ((regno + j) % REGSET_ELT_BITS);
bit = ((REGSET_ELT_TYPE) 1
<< ((regno + j) % REGSET_ELT_BITS));
bb_live_regs[offset] &= ~bit;
bb_dead_regs[offset] |= bit;
@ -2726,7 +2739,8 @@ schedule_block (b, file)
{
register int regno = REGNO (XEXP (link, 0));
register int offset = regno / REGSET_ELT_BITS;
register int bit = 1 << (regno % REGSET_ELT_BITS);
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (regno % REGSET_ELT_BITS);
/* Only unlink REG_DEAD notes; leave REG_UNUSED notes
alone. */
@ -2749,7 +2763,8 @@ schedule_block (b, file)
while (--j >= 0)
{
offset = (regno + j) / REGSET_ELT_BITS;
bit = 1 << ((regno + j) % REGSET_ELT_BITS);
bit = ((REGSET_ELT_TYPE) 1
<< ((regno + j) % REGSET_ELT_BITS));
bb_live_regs[offset] &= ~bit;
bb_dead_regs[offset] |= bit;
@ -2778,13 +2793,13 @@ schedule_block (b, file)
/* Start with registers live at end. */
for (j = 0; j < regset_size; j++)
{
int live = bb_live_regs[j];
REGSET_ELT_TYPE live = bb_live_regs[j];
old_live_regs[j] = live;
if (live)
{
register int bit;
register REGSET_ELT_TYPE bit;
for (bit = 0; bit < REGSET_ELT_BITS; bit++)
if (live & (1 << bit))
if (live & ((REGSET_ELT_TYPE) 1 << bit))
sometimes_max = new_sometimes_live (regs_sometimes_live, j,
bit, sometimes_max);
}
@ -2926,7 +2941,8 @@ schedule_block (b, file)
if (call_used_regs[i] || global_regs[i])
{
register int offset = i / REGSET_ELT_BITS;
register int bit = 1 << (i % REGSET_ELT_BITS);
register REGSET_ELT_TYPE bit
= (REGSET_ELT_TYPE) 1 << (i % REGSET_ELT_BITS);
bb_live_regs[offset] &= ~bit;
bb_dead_regs[offset] |= bit;
@ -2940,7 +2956,8 @@ schedule_block (b, file)
(below). */
p = regs_sometimes_live;
for (i = 0; i < sometimes_max; i++, p++)
if (bb_live_regs[p->offset] & (1 << p->bit))
if (bb_live_regs[p->offset]
& ((REGSET_ELT_TYPE) 1 << p->bit))
p->calls_crossed += 1;
}
@ -2951,13 +2968,13 @@ schedule_block (b, file)
/* Find registers now made live by that instruction. */
for (i = 0; i < regset_size; i++)
{
int diff = bb_live_regs[i] & ~old_live_regs[i];
REGSET_ELT_TYPE diff = bb_live_regs[i] & ~old_live_regs[i];
if (diff)
{
register int bit;
old_live_regs[i] |= diff;
for (bit = 0; bit < REGSET_ELT_BITS; bit++)
if (diff & (1 << bit))
if (diff & ((REGSET_ELT_TYPE) 1 << bit))
sometimes_max
= new_sometimes_live (regs_sometimes_live, i, bit,
sometimes_max);
@ -2974,14 +2991,16 @@ schedule_block (b, file)
p->live_length += 1;
if ((bb_live_regs[p->offset] & (1 << p->bit)) == 0)
if ((bb_live_regs[p->offset]
& ((REGSET_ELT_TYPE) 1 << p->bit)) == 0)
{
/* This is the end of one of this register's lifetime
segments. Save the lifetime info collected so far,
and clear its bit in the old_live_regs entry. */
sched_reg_live_length[regno] += p->live_length;
sched_reg_n_calls_crossed[regno] += p->calls_crossed;
old_live_regs[p->offset] &= ~(1 << p->bit);
old_live_regs[p->offset]
&= ~((REGSET_ELT_TYPE) 1 << p->bit);
/* Delete the reg_sometimes_live entry for this reg by
copying the last entry over top of it. */
@ -3517,7 +3536,7 @@ update_flow_info (notes, first, last, orig_insn)
REG_NOTES (first) = note;
insn = XEXP (note, 0);
note = find_reg_note (insn, REG_RETVAL, 0);
note = find_reg_note (insn, REG_RETVAL, NULL_RTX);
if (note)
XEXP (note, 0) = first;
break;
@ -3529,7 +3548,7 @@ update_flow_info (notes, first, last, orig_insn)
REG_NOTES (last) = note;
insn = XEXP (note, 0);
note = find_reg_note (insn, REG_LIBCALL, 0);
note = find_reg_note (insn, REG_LIBCALL, NULL_RTX);
if (note)
XEXP (note, 0) = last;
break;
@ -3783,7 +3802,9 @@ schedule_insns (dump_file)
return;
/* Create an insn here so that we can hang dependencies off of it later. */
sched_before_next_call = gen_rtx (INSN, VOIDmode, 0, 0, 0, 0, 0, 0, 0);
sched_before_next_call
= gen_rtx (INSN, VOIDmode, 0, NULL_RTX, NULL_RTX,
NULL_RTX, 0, NULL_RTX, 0);
/* Initialize the unused_*_lists. We can't use the ones left over from
the previous function, because gcc has freed that memory. We can use