diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-29 21:52:12 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-29 21:52:12 +0000 |
commit | b29201305bbc2cfaa81430aa06c81b6c12041ace (patch) | |
tree | 8b7cd2a3c1dc10fd6fe1a5ff6ec9025224f41a3e /gcc/reload.c | |
parent | e717a3eca5f58533cc159dc38b69907416bd6fff (diff) | |
download | gcc-b29201305bbc2cfaa81430aa06c81b6c12041ace.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45889 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 32 |
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; } } |