summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-09-29 21:52:12 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-09-29 21:52:12 +0000
commit3d17d93d9fe5c1141c319158e756f6b9b6300f86 (patch)
tree8b7cd2a3c1dc10fd6fe1a5ff6ec9025224f41a3e /gcc/reload.c
parent9f57ca195a961a5ed6d93d6a7f570fd0de7e5c6e (diff)
downloadgcc-3d17d93d9fe5c1141c319158e756f6b9b6300f86.tar.gz
reload.c (find_reloads): Mark new USE insns with QImode.
* 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
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 8e6d2b3afbf..cde34609127 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3816,7 +3816,11 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
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);
}
@@ -4302,7 +4306,11 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, 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);
@@ -4561,7 +4569,12 @@ find_reloads_address (mode, memrefloc, ad, loc, 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. */
}
@@ -4892,7 +4905,11 @@ subst_reg_equivs (ad, insn)
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;
}
}
@@ -5724,7 +5741,12 @@ find_reloads_subreg_address (x, force_replace, opnum, type,
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;
}
}