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/reload1.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/reload1.c')
-rw-r--r-- | gcc/reload1.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 820843257a2..bc3456f931c 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -758,6 +758,13 @@ reload (first, global) { 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++) @@ -1183,7 +1190,9 @@ reload (first, global) 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))))) @@ -8929,7 +8938,12 @@ reload_combine_note_use (xp, insn) 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: @@ -8946,10 +8960,9 @@ reload_combine_note_use (xp, insn) 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)); |