This is the mail archive of the gcc@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]

Re: 19990223 trunk build runs around in circles in insn_first_p in rtlanal.c compiling 1500+ line Fortran source :-)


> !   for (p = insn, q = reference; ;)
> !     {
> !       if (INSN_UID (insn) < max_uid_for_loop
> ! 	  && INSN_UID (reference) < max_uid_for_loop)
> ! 	return INSN_LUID (insn) < INSN_LUID (reference);

Of course this doesn't work... next try:

Wed Feb 24 00:49:25 1999  J"orn Rennecke <amylaar@cygnus.co.uk>

	* loop.c (loop_insn_first_p): Faster implementation.

Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.145
diff -p -r1.145 loop.c
*** loop.c	1999/02/22 14:11:55	1.145
--- loop.c	1999/02/24 00:49:58
*************** maybe_eliminate_biv (bl, loop_start, end
*** 8112,8125 ****
     This is like insn_first_p, except that we use the luid information if
     available.  */
  
! static int
  loop_insn_first_p (insn, reference)
       rtx insn, reference;
  {
!   return ((INSN_UID (insn) < max_uid_for_loop
! 	   && INSN_UID (reference) < max_uid_for_loop)
! 	  ? INSN_LUID (insn) < INSN_LUID (reference)
! 	  : insn_first_p (insn, reference));
  }
  
  /* We are trying to eliminate BIV in INSN using GIV.  Return non-zero if
--- 8110,8138 ----
     This is like insn_first_p, except that we use the luid information if
     available.  */
  
! int
  loop_insn_first_p (insn, reference)
       rtx insn, reference;
  {
!   rtx p, q;
! 
!   for (p = insn, q = reference; ;)
!     {
!       if (INSN_UID (p) < max_uid_for_loop
! 	  && INSN_UID (q) < max_uid_for_loop)
! 	return INSN_LUID (p) < INSN_LUID (q);
! 
!       /* Start with test for not first so that INSN == REFERENCE yields not
!          first.  */
!       if (q == insn || ! p)
!         return 0;
!       if (p == reference || ! q)
!         return 1;
!       if (INSN_UID (p) >= max_uid_for_loop)
! 	p = NEXT_INSN (p);
!       if (INSN_UID (q) >= max_uid_for_loop)
! 	q = NEXT_INSN (q);
!     }
  }
  
  /* We are trying to eliminate BIV in INSN using GIV.  Return non-zero if


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