mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-11 13:01:20 +08:00
rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after reload completes.
* rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after reload completes. * genattrtab.c (reload_completed): Define. * m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Remove obsolete comments. From-SVN: r17542
This commit is contained in:
parent
d2c92f5a43
commit
21ca87b81b
@ -1,3 +1,12 @@
|
||||
1998-01-28 Mike Stump <mrs@wrs.com>
|
||||
|
||||
* rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after
|
||||
reload completes.
|
||||
* genattrtab.c (reload_completed): Define.
|
||||
|
||||
* m32r.md, mips.md, mn10200.md, mn10300.md, pyr.md: Remove obsolete
|
||||
comments.
|
||||
|
||||
Wed Jan 28 20:11:06 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
|
||||
|
||||
* reload.c (push_reload): If WORD_REGISTER_OPERATIONS, reload the
|
||||
|
@ -379,8 +379,6 @@
|
||||
{
|
||||
/* Try to use auto-inc addressing if we can. */
|
||||
if (GET_CODE (XEXP (operands[1], 0)) == REG
|
||||
/* ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
because the REG_DEAD notes are not maintained after reload. */
|
||||
&& dead_or_set_p (insn, XEXP (operands[1], 0)))
|
||||
{
|
||||
operands[1] = XEXP (operands[1], 0);
|
||||
@ -391,8 +389,6 @@
|
||||
case 3 :
|
||||
/* Try to use auto-inc addressing if we can. */
|
||||
if (GET_CODE (XEXP (operands[0], 0)) == REG
|
||||
/* ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
because the REG_DEAD notes are not maintained after reload. */
|
||||
&& dead_or_set_p (insn, XEXP (operands[0], 0)))
|
||||
{
|
||||
operands[0] = XEXP (operands[0], 0);
|
||||
@ -534,8 +530,6 @@
|
||||
{
|
||||
/* Try to use auto-inc addressing if we can. */
|
||||
if (GET_CODE (XEXP (operands[1], 0)) == REG
|
||||
/* ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
because the REG_DEAD notes are not maintained after reload. */
|
||||
&& dead_or_set_p (insn, XEXP (operands[1], 0)))
|
||||
{
|
||||
operands[1] = XEXP (operands[1], 0);
|
||||
@ -546,8 +540,6 @@
|
||||
case 3 :
|
||||
/* Try to use auto-inc addressing if we can. */
|
||||
if (GET_CODE (XEXP (operands[0], 0)) == REG
|
||||
/* ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
because the REG_DEAD notes are not maintained after reload. */
|
||||
&& dead_or_set_p (insn, XEXP (operands[0], 0)))
|
||||
{
|
||||
operands[0] = XEXP (operands[0], 0);
|
||||
@ -1471,8 +1463,6 @@
|
||||
[(set (mem:SI (plus:SI (match_operand:SI 0 "register_operand" "r")
|
||||
(const_int 4)))
|
||||
(match_operand:SI 1 "register_operand" "r"))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (insn, operands[0])"
|
||||
"st %1,@+%0"
|
||||
[(set_attr "type" "store")
|
||||
|
@ -9771,8 +9771,6 @@ move\\t%0,%z4\\n\\
|
||||
"TARGET_MIPS16
|
||||
&& GET_CODE (operands[0]) == REG
|
||||
&& REGNO (operands[0]) == 24
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
&& dead_or_set_p (insn, operands[0])
|
||||
&& GET_CODE (operands[1]) == REG
|
||||
&& M16_REG_P (REGNO (operands[1]))"
|
||||
@ -9798,8 +9796,6 @@ move\\t%0,%z4\\n\\
|
||||
"TARGET_MIPS16 && TARGET_64BIT
|
||||
&& GET_CODE (operands[0]) == REG
|
||||
&& REGNO (operands[0]) == 24
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
&& dead_or_set_p (insn, operands[0])
|
||||
&& GET_CODE (operands[1]) == REG
|
||||
&& M16_REG_P (REGNO (operands[1]))"
|
||||
@ -9831,8 +9827,6 @@ move\\t%0,%z4\\n\\
|
||||
&& REGNO (operands[1]) == 24
|
||||
&& GET_CODE (operands[0]) == REG
|
||||
&& M16_REG_P (REGNO (operands[0]))
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
&& dead_or_set_p (insn, operands[0])"
|
||||
"*
|
||||
{
|
||||
@ -9858,8 +9852,6 @@ move\\t%0,%z4\\n\\
|
||||
&& REGNO (operands[1]) == 24
|
||||
&& GET_CODE (operands[0]) == REG
|
||||
&& M16_REG_P (REGNO (operands[0]))
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
&& dead_or_set_p (insn, operands[0])"
|
||||
"*
|
||||
{
|
||||
|
@ -1888,8 +1888,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcc %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1899,8 +1897,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcs %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1910,8 +1906,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcs %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1921,8 +1915,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcc %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1932,8 +1924,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bccx %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1943,8 +1933,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcsx %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1954,8 +1942,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcsx %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1965,8 +1951,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bccx %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
|
@ -1397,8 +1397,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcc %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1408,8 +1406,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(match_operand 1 "" "")
|
||||
(pc)))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcs %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1419,8 +1415,6 @@
|
||||
(set (pc) (if_then_else (ge (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcs %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
@ -1430,8 +1424,6 @@
|
||||
(set (pc) (if_then_else (lt (cc0) (const_int 0))
|
||||
(pc)
|
||||
(match_operand 1 "" "")))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (ins1, operands[0]) && REG_OK_FOR_INDEX_P (operands[0])"
|
||||
"add %0,%0\;bcc %1"
|
||||
[(set_attr "cc" "clobber")])
|
||||
|
@ -1224,8 +1224,6 @@
|
||||
(sign_extend:SI (match_dup 1)))
|
||||
(set (cc0)
|
||||
(match_dup 2))]
|
||||
;; ??? This is WRONG, dead_or_set_p cannot be used after reload
|
||||
;; because the REG_DEAD notes are not maintained after reload.
|
||||
"dead_or_set_p (insn, operands[2])"
|
||||
"*
|
||||
cc_status.flags |= CC_NO_OVERFLOW;
|
||||
|
@ -348,6 +348,11 @@ static rtx true_rtx, false_rtx;
|
||||
|
||||
static char *alternative_name;
|
||||
|
||||
/* Indicate that REG_DEAD notes are valid if dead_or_set_p is ever
|
||||
called. */
|
||||
|
||||
int reload_completed = 0;
|
||||
|
||||
/* Simplify an expression. Only call the routine if there is something to
|
||||
simplify. */
|
||||
#define SIMPLIFY_TEST_EXP(EXP,INSN_CODE,INSN_INDEX) \
|
||||
|
@ -1157,19 +1157,30 @@ dead_or_set_regno_p (insn, test_regno)
|
||||
int regno, endregno;
|
||||
rtx link;
|
||||
|
||||
/* See if there is a death note for something that includes TEST_REGNO. */
|
||||
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
|
||||
/* REG_READ notes are not normally maintained after reload, so we
|
||||
ignore them if the are invalid. */
|
||||
if (! reload_completed
|
||||
#ifdef PRESERVE_DEATH_INFO_REGNO_P
|
||||
|| PRESERVE_DEATH_INFO_REGNO_P (test_regno)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (REG_NOTE_KIND (link) != REG_DEAD || GET_CODE (XEXP (link, 0)) != REG)
|
||||
continue;
|
||||
/* See if there is a death note for something that includes
|
||||
TEST_REGNO. */
|
||||
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
|
||||
{
|
||||
if (REG_NOTE_KIND (link) != REG_DEAD
|
||||
|| GET_CODE (XEXP (link, 0)) != REG)
|
||||
continue;
|
||||
|
||||
regno = REGNO (XEXP (link, 0));
|
||||
endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
|
||||
: regno + HARD_REGNO_NREGS (regno,
|
||||
GET_MODE (XEXP (link, 0))));
|
||||
regno = REGNO (XEXP (link, 0));
|
||||
endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
|
||||
: regno + HARD_REGNO_NREGS (regno,
|
||||
GET_MODE (XEXP (link, 0))));
|
||||
|
||||
if (test_regno >= regno && test_regno < endregno)
|
||||
return 1;
|
||||
if (test_regno >= regno && test_regno < endregno)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (GET_CODE (insn) == CALL_INSN
|
||||
|
Loading…
x
Reference in New Issue
Block a user