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] reload.c: Make some functions static.


Hi,

Attached is a patch to make refers_to_mem_for_reload_p and
refers_to_regno_for_reload_p static as they are used only from
reload.c.

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

Kazu Hirata

2004-11-09  Kazu Hirata  <kazu@cs.umass.edu>

	* reload.c (refers_to_mem_for_reload_p,
	refers_to_regno_for_reload_p): Make them static.
	* reload.h: Remove the corresponding prototypes.

Index: reload.c
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/reload.c,v
retrieving revision 1.257
diff -u -d -p -r1.257 reload.c
--- reload.c	14 Oct 2004 18:32:04 -0000	1.257
+++ reload.c	9 Nov 2004 00:15:28 -0000
@@ -271,6 +271,9 @@ static rtx find_reloads_subreg_address (
 					int, rtx);
 static void copy_replacements_1 (rtx *, rtx *, int);
 static int find_inc_amount (rtx, rtx);
+static int refers_to_mem_for_reload_p (rtx);
+static int refers_to_regno_for_reload_p (unsigned int, unsigned int,
+					 rtx, rtx *);
 
 #ifdef HAVE_SECONDARY_RELOADS
 
@@ -6171,7 +6174,7 @@ find_replacement (rtx *loc)
    This is similar to refers_to_regno_p in rtlanal.c except that we
    look at equivalences for pseudos that didn't get hard registers.  */
 
-int
+static int
 refers_to_regno_for_reload_p (unsigned int regno, unsigned int endregno,
 			      rtx x, rtx *loc)
 {
@@ -6364,7 +6367,7 @@ reg_overlap_mentioned_for_reload_p (rtx 
 /* Return nonzero if anything in X contains a MEM.  Look also for pseudo
    registers.  */
 
-int
+static int
 refers_to_mem_for_reload_p (rtx x)
 {
   const char *fmt;
Index: reload.h
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/reload.h,v
retrieving revision 1.47
diff -u -d -p -r1.47 reload.h
--- reload.h	15 Oct 2004 14:47:10 -0000	1.47
+++ reload.h	9 Nov 2004 00:15:45 -0000
@@ -308,19 +308,9 @@ extern void move_replacements (rtx *x, r
    Otherwise, return *LOC.  */
 extern rtx find_replacement (rtx *);
 
-/* Return nonzero if register in range [REGNO, ENDREGNO)
-   appears either explicitly or implicitly in X
-   other than being stored into.  */
-extern int refers_to_regno_for_reload_p (unsigned int, unsigned int,
-					 rtx, rtx *);
-
 /* Nonzero if modifying X will affect IN.  */
 extern int reg_overlap_mentioned_for_reload_p (rtx, rtx);
 
-/* Return nonzero if anything in X contains a MEM.  Look also for pseudo
-   registers.  */
-extern int refers_to_mem_for_reload_p (rtx);
-
 /* Check the insns before INSN to see if there is a suitable register
    containing the same value as GOAL.  */
 extern rtx find_equiv_reg (rtx, rtx, enum reg_class, int, short *,


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