This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] h8300.md: Replace find_regno_note with peep2_reg_dead_p.


Hi,

Attached is a patch to replace find_regno_note with peep2_reg_dead_p
as suggested by

http://gcc.gnu.org/ml/gcc-patches/2003-02/msg00831.html

Tested on h8300 port.  Committed.

Kazu Hirata

2003-02-12  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.md (several peephole2): Replace
	find_regno_note with peep2_reg_dead_p.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.161
diff -u -r1.161 h8300.md
--- h8300.md	11 Feb 2003 19:36:49 -0000	1.161
+++ h8300.md	12 Feb 2003 13:49:48 -0000
@@ -3448,7 +3448,7 @@
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
   "(TARGET_H8300H || TARGET_H8300S)
-   && find_regno_note (insn, REG_DEAD, REGNO (operands[0]))"
+   && peep2_reg_dead_p (1, operands[0])"
   [(set (cc0)
 	(match_dup 0))
    (set (pc)
@@ -3470,7 +3470,7 @@
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
   "(TARGET_H8300H || TARGET_H8300S)
-   && find_regno_note (insn, REG_DEAD, REGNO (operands[0]))"
+   && peep2_reg_dead_p (1, operands[0])"
   [(set (cc0)
 	(match_dup 0))
    (set (pc)
@@ -3492,7 +3492,7 @@
 		      (label_ref (match_operand 3 "" ""))
 		      (pc)))]
   "(TARGET_H8300H || TARGET_H8300S)
-   && find_regno_note (insn, REG_DEAD, REGNO (operands[0]))
+   && peep2_reg_dead_p (1, operands[0])
    && (INTVAL (operands[1]) == 1
        || INTVAL (operands[1]) == 3
        || INTVAL (operands[1]) == 7
@@ -3529,7 +3529,7 @@
 			[(cc0) (const_int 0)])
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
-  "find_regno_note (next_nonnote_insn (insn), REG_DEAD, REGNO (operands[0]))"
+  "peep2_reg_dead_p (2, operands[0])"
   [(set (match_dup 4)
 	(and:QI (match_dup 4)
 		(match_dup 5)))
@@ -3553,7 +3553,7 @@
 			[(cc0) (const_int 0)])
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
-  "find_regno_note (next_nonnote_insn (insn), REG_DEAD, REGNO (operands[0]))"
+  "peep2_reg_dead_p (2, operands[0])"
   [(set (match_dup 4)
 	(and:QI (match_dup 4)
 		(match_dup 5)))
@@ -3577,7 +3577,7 @@
 			[(cc0) (const_int 0)])
 		      (label_ref (match_operand 2 "" ""))
 		      (pc)))]
-  "find_regno_note (next_nonnote_insn (insn), REG_DEAD, REGNO (operands[0]))"
+  "peep2_reg_dead_p (2, operands[0])"
   [(set (match_dup 4)
 	(and:HI (match_dup 4)
 		(match_dup 5)))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]