scheduling problems again

Mike Stump mrs@wrs.com
Tue Jan 27 21:10:00 GMT 1998


> To: Marc Lehmann <pcg@goof.com>
> cc: egcs@cygnus.com
> Date: Tue, 27 Jan 1998 21:18:59 -0700
> From: Jeffrey A Law <law@cygnus.com>

> Depending on them after reload is plain wrong.  This is a bug in
> jump.c plain and simple.  Some ports also have this bug in peepholes
> because they use dead_or_set_p.

I'm not sure if I understand exactly where they can't go, but my guess
is you meant the below cases.  If I guessed right, can you put this
in, so that the people that stare at the machine ports in question,
can stare at the bogosity of the port as well.  The first step in
fixing a problem is identifying it.

Doing diffs in .:
*** ./gcc/config/m32r/m32r.md.~1~	Thu Jan 15 17:31:15 1998
--- ./gcc/config/m32r/m32r.md	Tue Jan 27 21:00:22 1998
***************
*** 1463,1468 ****
--- 1463,1470 ----
    [(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")
*** ./gcc/config/mips/mips.md.~1~	Fri Jan 23 15:54:32 1998
--- ./gcc/config/mips/mips.md	Tue Jan 27 21:01:25 1998
*************** move\\t%0,%z4\\n\\
*** 9771,9776 ****
--- 9771,9778 ----
    "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]))"
*************** move\\t%0,%z4\\n\\
*** 9796,9801 ****
--- 9798,9805 ----
    "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]))"
*************** move\\t%0,%z4\\n\\
*** 9827,9832 ****
--- 9831,9838 ----
     && 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])"
    "*
  {
*************** move\\t%0,%z4\\n\\
*** 9852,9857 ****
--- 9858,9865 ----
     && 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])"
    "*
  {
*** ./gcc/config/mn10200/mn10200.md.~1~	Thu Jan 15 17:34:07 1998
--- ./gcc/config/mn10200/mn10200.md	Tue Jan 27 21:01:58 1998
***************
*** 1888,1893 ****
--- 1888,1895 ----
     (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")])
***************
*** 1897,1902 ****
--- 1899,1906 ----
     (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")])
***************
*** 1906,1911 ****
--- 1910,1917 ----
     (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")])
***************
*** 1915,1920 ****
--- 1921,1928 ----
     (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")])
***************
*** 1924,1929 ****
--- 1932,1939 ----
     (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")])
***************
*** 1933,1938 ****
--- 1943,1950 ----
     (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")])
***************
*** 1942,1947 ****
--- 1954,1961 ----
     (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")])
***************
*** 1951,1956 ****
--- 1965,1972 ----
     (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")])
*** ./gcc/config/mn10300/mn10300.md.~1~	Thu Jan 15 17:34:18 1998
--- ./gcc/config/mn10300/mn10300.md	Tue Jan 27 21:01:57 1998
***************
*** 1397,1402 ****
--- 1397,1404 ----
     (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")])
***************
*** 1406,1411 ****
--- 1408,1415 ----
     (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")])
***************
*** 1415,1420 ****
--- 1419,1426 ----
     (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")])
***************
*** 1424,1429 ****
--- 1430,1437 ----
     (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")])
*** ./gcc/config/pyr/pyr.md.~1~	Thu Jan 15 17:35:47 1998
--- ./gcc/config/pyr/pyr.md	Tue Jan 27 21:01:56 1998
***************
*** 1224,1229 ****
--- 1224,1231 ----
  	(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;
--------------




More information about the Gcc mailing list