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] *.c: Use INSN_P instead of its definition.


Hi,

Attached is a patch to use INSN_P instead of its definition.  INSN_P
is much more widely used than its definition.  The patch makes the
source code more consistent.

Committed as obvious.

Kazu Hirata

2003-06-28  Kazu Hirata  <kazu@cs.umass.edu>

	* gcse.c (compute_ld_motion_mems): Use INSN_P instead of its
	definition.
	(store_killed_in_insn): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* config/frv/frv.c (frv_final_prescan_insn): Likewise.
	* config/m68hc11/m68hc11.c (dead_register_here): Likewise.
	(m68hc11_reassign_regs): Likewise.
	(m68hc11_reorg): Likewise.

Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.252
diff -u -r1.252 gcse.c
--- gcse.c	27 Jun 2003 19:38:27 -0000	1.252
+++ gcse.c	28 Jun 2003 14:44:18 -0000
@@ -6834,7 +6834,7 @@
 	   insn && insn != NEXT_INSN (bb->end);
 	   insn = NEXT_INSN (insn))
 	{
-	  if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
+	  if (INSN_P (insn))
 	    {
 	      if (GET_CODE (PATTERN (insn)) == SET)
 		{
@@ -7448,7 +7448,7 @@
 {
   rtx reg, base;
 
-  if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+  if (!INSN_P (insn))
     return false;
 
   if (GET_CODE (insn) == CALL_INSN)
Index: print-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/print-rtl.c,v
retrieving revision 1.98
diff -u -r1.98 print-rtl.c
--- print-rtl.c	16 Jun 2003 11:30:21 -0000	1.98
+++ print-rtl.c	28 Jun 2003 14:44:18 -0000
@@ -379,7 +379,7 @@
 	break;
 
       case 'i':
-	if (i == 4 && GET_RTX_CLASS (GET_CODE (in_rtx)) == 'i')
+	if (i == 4 && INSN_P (in_rtx))
 	  {
 #ifndef GENERATOR_FILE
 	    /*  Pretty-print insn locators.  Ignore scoping as it is mostly
Index: config/frv/frv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.26
diff -u -r1.26 frv.c
--- config/frv/frv.c	16 Jun 2003 21:41:09 -0000	1.26
+++ config/frv/frv.c	28 Jun 2003 14:44:23 -0000
@@ -2326,7 +2326,7 @@
   if (! PACKING_FLAG_USED_P())
     return;
 
-  if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+  if (!INSN_P (insn))
     return;
 
   frv_insn_operands = opvec;
Index: config/m68hc11/m68hc11.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/m68hc11.c,v
retrieving revision 1.81
diff -u -r1.81 m68hc11.c
--- config/m68hc11/m68hc11.c	19 Jun 2003 21:47:15 -0000	1.81
+++ config/m68hc11/m68hc11.c	28 Jun 2003 14:44:25 -0000
@@ -2100,7 +2100,7 @@
     x_reg = 0;
 
   for (p = PREV_INSN (x); p && GET_CODE (p) != CODE_LABEL; p = PREV_INSN (p))
-    if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
+    if (INSN_P (p))
       {
 	rtx body;
 
@@ -5158,7 +5158,7 @@
 	  || GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER)
 	continue;
 
-      if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+      if (!INSN_P (insn))
 	continue;
 
       body = PATTERN (insn);
@@ -5287,7 +5287,7 @@
 
 	if (INSN_DELETED_P (insn))
 	  continue;
-	if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+	if (!INSN_P (insn))
 	  continue;
 
 	/* Remove the (set (R) (R)) insns generated by some splits.  */


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