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]

RFA: amend comment in loop_invariant_p


2003-11-25  J"orn Rennecke <joern.rennecke@superh.com>

	* loop.c (loop_invariant_p): Amend comment about where new registers
	might come from.

Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.476
diff -p -r1.476 loop.c
*** loop.c	21 Nov 2003 06:52:23 -0000	1.476
--- loop.c	25 Nov 2003 17:46:21 -0000
*************** loop_invariant_p (const struct loop *loo
*** 3298,3305 ****
  	return 0;
  
        /* Out-of-range regs can occur when we are called from unrolling.
! 	 These have always been created by the unroller and are set in
! 	 the loop, hence are never invariant.  */
  
        if (REGNO (x) >= (unsigned) regs->num)
  	return 0;
--- 3298,3311 ----
  	return 0;
  
        /* Out-of-range regs can occur when we are called from unrolling.
! 	 These registers created by the unroller are set in the loop,
! 	 hence are never invariant.
! 	 Other out-of-range regs can be generated by load_mems; those that
! 	 are written to in the loop are not invariant, while those that are
! 	 not written to are invariant.  It would be easy for load_mems
! 	 to set n_times_set correctly for these registers, however, there
! 	 is no easy way to distinguish them from registers created by the
! 	 unroller.  */
  
        if (REGNO (x) >= (unsigned) regs->num)
  	return 0;


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