trivial changes

Andrew Macleod amacleod@cygnus.com
Mon Feb 22 14:16:00 GMT 1999


I've applied the following trivial patch to the egcs source tree. It shouldn't
affect anything, just preparation for future changes.

Andrew


	* loop.c (libcall_other_regs): Make extern.
	* rtl.h (find_last_value): Add parameter to prototype.
	(libcall_other_reg): Add extern declaration.
	* rtlanal.c (find_last_value): Add another parameter to allow
	a definition using a hardware register to be found as well.


Index: gcc/loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.144
diff -c -p -r1.144 loop.c
*** loop.c	1999/02/19 14:49:59	1.144
--- loop.c	1999/02/22 21:35:44
*************** static void mark_loop_jump PROTO((rtx, i
*** 291,297 ****
  static void prescan_loop PROTO((rtx, rtx));
  static int reg_in_basic_block_p PROTO((rtx, rtx));
  static int consec_sets_invariant_p PROTO((rtx, int, rtx));
- static rtx libcall_other_reg PROTO((rtx, rtx));
  static int labels_in_range_p PROTO((rtx, int));
  static void count_one_set PROTO((rtx, rtx, varray_type, rtx *));
  
--- 291,296 ----
*************** record_excess_regs (in_this, not_in_this
*** 1241,1247 ****
     If there are none, return 0.
     If there are one or more, return an EXPR_LIST containing all of them.  */
  
! static rtx
  libcall_other_reg (insn, equiv)
       rtx insn, equiv;
  {
--- 1240,1246 ----
     If there are none, return 0.
     If there are one or more, return an EXPR_LIST containing all of them.  */
  
! rtx
  libcall_other_reg (insn, equiv)
       rtx insn, equiv;
  {
Index: gcc/rtl.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtl.h,v
retrieving revision 1.86
diff -c -p -r1.86 rtl.h
*** rtl.h	1999/02/08 21:39:31	1.86
--- rtl.h	1999/02/22 21:35:47
*************** extern int modified_in_p		PROTO((rtx, rt
*** 1013,1019 ****
  extern int reg_set_p			PROTO((rtx, rtx));
  extern rtx single_set			PROTO((rtx));
  extern int multiple_sets		PROTO((rtx));
! extern rtx find_last_value		PROTO((rtx, rtx *, rtx));
  extern int refers_to_regno_p		PROTO((int, int, rtx, rtx *));
  extern int reg_overlap_mentioned_p	PROTO((rtx, rtx));
  extern void note_stores			PROTO((rtx, void (*)()));
--- 1013,1019 ----
  extern int reg_set_p			PROTO((rtx, rtx));
  extern rtx single_set			PROTO((rtx));
  extern int multiple_sets		PROTO((rtx));
! extern rtx find_last_value		PROTO((rtx, rtx *, rtx, int));
  extern int refers_to_regno_p		PROTO((int, int, rtx, rtx *));
  extern int reg_overlap_mentioned_p	PROTO((rtx, rtx));
  extern void note_stores			PROTO((rtx, void (*)()));
*************** extern void print_inline_rtx		PROTO ((FI
*** 1390,1395 ****
--- 1390,1396 ----
  
  /* In loop.c */
  extern void init_loop			PROTO ((void));
+ extern rtx libcall_other_reg		PROTO ((rtx, rtx));
  #ifdef BUFSIZ
  extern void loop_optimize		PROTO ((rtx, FILE *, int, int));
  #endif
Index: gcc/rtlanal.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/rtlanal.c,v
retrieving revision 1.31
diff -c -p -r1.31 rtlanal.c
*** rtlanal.c	1999/02/19 14:49:57	1.31
--- rtlanal.c	1999/02/22 21:35:54
*************** multiple_sets (insn)
*** 740,752 ****
  /* Return the last thing that X was assigned from before *PINSN.  Verify that
     the object is not modified up to VALID_TO.  If it was, if we hit
     a partial assignment to X, or hit a CODE_LABEL first, return X.  If we
!    found an assignment, update *PINSN to point to it.  */
  
  rtx
! find_last_value (x, pinsn, valid_to)
       rtx x;
       rtx *pinsn;
       rtx valid_to;
  {
    rtx p;
  
--- 740,754 ----
  /* Return the last thing that X was assigned from before *PINSN.  Verify that
     the object is not modified up to VALID_TO.  If it was, if we hit
     a partial assignment to X, or hit a CODE_LABEL first, return X.  If we
!    found an assignment, update *PINSN to point to it.  
!    ALLOW_HWREG is set to 1 if hardware registers are allowed to be the src.  */
  
  rtx
! find_last_value (x, pinsn, valid_to, allow_hwreg)
       rtx x;
       rtx *pinsn;
       rtx valid_to;
+      int allow_hwreg;
  {
    rtx p;
  
*************** find_last_value (x, pinsn, valid_to)
*** 767,774 ****
  	    if (! modified_between_p (src, PREV_INSN (p), valid_to)
  		/* Reject hard registers because we don't usually want
  		   to use them; we'd rather use a pseudo.  */
! 		&& ! (GET_CODE (src) == REG
! 		      && REGNO (src) < FIRST_PSEUDO_REGISTER))
  	      {
  		*pinsn = p;
  		return src;
--- 769,776 ----
  	    if (! modified_between_p (src, PREV_INSN (p), valid_to)
  		/* Reject hard registers because we don't usually want
  		   to use them; we'd rather use a pseudo.  */
! 		&& (! (GET_CODE (src) == REG
! 		      && REGNO (src) < FIRST_PSEUDO_REGISTER) || allow_hwreg))
  	      {
  		*pinsn = p;
  		return src;


More information about the Gcc-patches mailing list