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] rtlanal.c: Remove regs_set_between_p.


Hi,

Attached is a patch to remove regs_set_between_p as it is unused.

AFAICT, the last uses of this function were removed in

http://gcc.gnu.org/ml/gcc-patches/2000-04/msg01271.html

That is, the function has been unused for almost five years.

Bootstrapped on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-01-14  Kazu Hirata  <kazu@cs.umass.edu>

	* rtlanal.c (regs_set_between_p): Remove.
	* rtl.h: Remove the corresponding prototype.

Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtlanal.c,v
retrieving revision 1.207
diff -u -d -p -r1.207 rtlanal.c
--- rtlanal.c	5 Jan 2005 23:19:21 -0000	1.207
+++ rtlanal.c	14 Jan 2005 08:37:19 -0000
@@ -784,51 +784,6 @@ reg_set_p (rtx reg, rtx insn)
 }
 
 /* Similar to reg_set_between_p, but check all registers in X.  Return 0
-   only if none of them are modified between START and END.  Do not
-   consider non-registers one way or the other.  */
-
-int
-regs_set_between_p (rtx x, rtx start, rtx end)
-{
-  enum rtx_code code = GET_CODE (x);
-  const char *fmt;
-  int i, j;
-
-  switch (code)
-    {
-    case CONST_INT:
-    case CONST_DOUBLE:
-    case CONST_VECTOR:
-    case CONST:
-    case SYMBOL_REF:
-    case LABEL_REF:
-    case PC:
-    case CC0:
-      return 0;
-
-    case REG:
-      return reg_set_between_p (x, start, end);
-
-    default:
-      break;
-    }
-
-  fmt = GET_RTX_FORMAT (code);
-  for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
-    {
-      if (fmt[i] == 'e' && regs_set_between_p (XEXP (x, i), start, end))
-	return 1;
-
-      else if (fmt[i] == 'E')
-	for (j = XVECLEN (x, i) - 1; j >= 0; j--)
-	  if (regs_set_between_p (XVECEXP (x, i, j), start, end))
-	    return 1;
-    }
-
-  return 0;
-}
-
-/* Similar to reg_set_between_p, but check all registers in X.  Return 0
    only if none of them are modified between START and END.  Return 1 if
    X contains a MEM; this routine does usememory aliasing.  */
 
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.529
diff -u -d -p -r1.529 rtl.h
--- rtl.h	1 Dec 2004 18:13:31 -0000	1.529
+++ rtl.h	14 Jan 2005 08:37:21 -0000
@@ -1579,7 +1579,6 @@ extern int count_occurrences (rtx, rtx, 
 extern int reg_referenced_p (rtx, rtx);
 extern int reg_used_between_p (rtx, rtx, rtx);
 extern int reg_set_between_p (rtx, rtx, rtx);
-extern int regs_set_between_p (rtx, rtx, rtx);
 extern int commutative_operand_precedence (rtx);
 extern int swap_commutative_operands_p (rtx, rtx);
 extern int modified_between_p (rtx, rtx, rtx);


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