* reload.c (find_reloads): Mark new USE insns with QImode.
(find_reloads_toplev, find_reloads_address, subst_reg_equivs,
find_reloads_subreg_address): Likewise.
* regrename.c (note_sets, clear_dead_regs): Abort if pseudos are
encountered.
* reload1.c (reload_combine_note_use): Likewise, inside USEs and
CLOBBERs.
(reload): Make sure there are no USEs with mode other than
VOIDmode. At the end, remove those marked with QImode.
From-SVN: r45889
+2001-09-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * reload.c (find_reloads): Mark new USE insns with QImode.
+ (find_reloads_toplev, find_reloads_address, subst_reg_equivs,
+ find_reloads_subreg_address): Likewise.
+ * regrename.c (note_sets, clear_dead_regs): Abort if pseudos are
+ encountered.
+ * reload1.c (reload_combine_note_use): Likewise, inside USEs and
+ CLOBBERs.
+ (reload): Make sure there are no USEs with mode other than
+ VOIDmode. At the end, remove those marked with QImode.
+
2001-09-29 Per Bothner <per@bothner.com>
* cppdefault.c (cpp_include_defaults): Also search PREFIX_INCLUDE_DIR.
return;
regno = REGNO (x);
nregs = HARD_REGNO_NREGS (regno, GET_MODE (x));
+
+ /* There must not be pseudos at this point. */
+ if (regno + nregs > FIRST_PSEUDO_REGISTER)
+ abort ();
+
while (nregs-- > 0)
SET_HARD_REG_BIT (*pset, regno + nregs);
}
rtx reg = XEXP (note, 0);
unsigned int regno = REGNO (reg);
int nregs = HARD_REGNO_NREGS (regno, GET_MODE (reg));
+
+ /* There must not be pseudos at this point. */
+ if (regno + nregs > FIRST_PSEUDO_REGISTER)
+ abort ();
+
while (nregs-- > 0)
CLEAR_HARD_REG_BIT (*pset, regno + nregs);
}
if (GET_CODE (operand) == REG)
{
if (modified[i] != RELOAD_WRITE)
- emit_insn_before (gen_rtx_USE (VOIDmode, operand), insn);
+ /* We mark the USE with QImode so that we recognize
+ it as one that can be safely deleted at the end
+ of reload. */
+ PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, operand),
+ insn), QImode);
if (modified[i] != RELOAD_READ)
emit_insn_after (gen_rtx_CLOBBER (VOIDmode, operand), insn);
}
this substitution. We have to emit a USE of the pseudo so
that delete_output_reload can see it. */
if (replace_reloads && recog_data.operand[opnum] != x)
- emit_insn_before (gen_rtx_USE (VOIDmode, x), insn);
+ /* We mark the USE with QImode so that we recognize it
+ as one that can be safely deleted at the end of
+ reload. */
+ PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, x), insn),
+ QImode);
x = mem;
i = find_reloads_address (GET_MODE (x), &x, XEXP (x, 0), &XEXP (x, 0),
opnum, type, ind_levels, insn);
&& ! rtx_equal_p (tem, reg_equiv_mem[regno]))
{
*loc = tem;
- emit_insn_before (gen_rtx_USE (VOIDmode, ad), insn);
+ /* We mark the USE with QImode so that we
+ recognize it as one that can be safely
+ deleted at the end of reload. */
+ PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, ad),
+ insn), QImode);
+
/* This doesn't really count as replacing the address
as a whole, since it is still a memory access. */
}
if (! rtx_equal_p (mem, reg_equiv_mem[regno]))
{
subst_reg_equivs_changed = 1;
- emit_insn_before (gen_rtx_USE (VOIDmode, ad), insn);
+ /* We mark the USE with QImode so that we recognize it
+ as one that can be safely deleted at the end of
+ reload. */
+ PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode, ad), insn),
+ QImode);
return mem;
}
}
this substitution. We have to emit a USE of the pseudo so
that delete_output_reload can see it. */
if (replace_reloads && recog_data.operand[opnum] != x)
- emit_insn_before (gen_rtx_USE (VOIDmode, SUBREG_REG (x)), insn);
+ /* We mark the USE with QImode so that we recognize it
+ as one that can be safely deleted at the end of
+ reload. */
+ PUT_MODE (emit_insn_before (gen_rtx_USE (VOIDmode,
+ SUBREG_REG (x)),
+ insn), QImode);
x = tem;
}
}
{
rtx set = single_set (insn);
+ /* We may introduce USEs that we want to remove at the end, so
+ we'll mark them with QImode. Make sure there are no
+ previously-marked insns left by say regmove. */
+ if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
+ && GET_MODE (insn) != VOIDmode)
+ PUT_MODE (insn, VOIDmode);
+
if (GET_CODE (insn) == CALL_INSN
&& find_reg_note (insn, REG_SETJMP, NULL))
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
CALL_INSN_FUNCTION_USAGE (insn));
if ((GET_CODE (PATTERN (insn)) == USE
- && find_reg_note (insn, REG_EQUAL, NULL_RTX))
+ /* We mark with QImode USEs introduced by reload itself. */
+ && (GET_MODE (insn) == QImode
+ || find_reg_note (insn, REG_EQUAL, NULL_RTX)))
|| (GET_CODE (PATTERN (insn)) == CLOBBER
&& (GET_CODE (XEXP (PATTERN (insn), 0)) != REG
|| ! REG_FUNCTION_VALUE_P (XEXP (PATTERN (insn), 0)))))
case CLOBBER:
if (GET_CODE (SET_DEST (x)) == REG)
- return;
+ {
+ /* No spurious CLOBBERs of pseudo registers may remain. */
+ if (REGNO (SET_DEST (x)) >= FIRST_PSEUDO_REGISTER)
+ abort ();
+ return;
+ }
break;
case PLUS:
int use_index;
int nregs;
- /* Some spurious USEs of pseudo registers might remain.
- Just ignore them. */
+ /* No spurious USEs of pseudo registers may remain. */
if (regno >= FIRST_PSEUDO_REGISTER)
- return;
+ abort ();
nregs = HARD_REGNO_NREGS (regno, GET_MODE (x));