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]
Other format: [Raw text]

Re: Loop optimization bug with Ada front end on PPC (and probably Alpha)


On Tue, Nov 27, 2001 at 05:05:35PM -0600, Corey Minyard wrote:
> You will need to set the bl variable a little differently, in case its a 
> GIV.  I've attached a patch.  That was the cause of my segv earlier. 

Ug.  I should have done a complete bootstrap with ia64 as well --
Seems that some cases the BIV initializer is constructed by loop,
or something.  In any case, INSN_LUID aborts.

>  Bootstrapping again....

Me too.  Current patch appended.


r~



Index: doloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doloop.c,v
retrieving revision 1.13
diff -c -p -d -r1.13 doloop.c
*** doloop.c	2001/11/27 22:09:10	1.13
--- doloop.c	2001/11/27 23:29:17
*************** doloop_modify_runtime (loop, iterations_
*** 622,631 ****
    if (loop->scan_start)
      {
        struct loop_ivs *ivs = LOOP_IVS (loop);
!       struct iv_class *bl
! 	= REG_IV_CLASS (ivs, REGNO (loop_info->iteration_var));
  
!       if (INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start))
  	{
  	  if (loop_dump_stream)
  	    fprintf (loop_dump_stream,
--- 622,642 ----
    if (loop->scan_start)
      {
        struct loop_ivs *ivs = LOOP_IVS (loop);
!       struct iv_class *bl;
  
!       if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == BASIC_INDUCT)
! 	bl = REG_IV_CLASS (ivs, REGNO (iteration_var));
!       else if (REG_IV_TYPE (ivs, REGNO (iteration_var)) == GENERAL_INDUCT)
! 	{
! 	  struct induction *v = REG_IV_INFO (ivs, REGNO (iteration_var));
! 	  bl = REG_IV_CLASS (ivs, REGNO (v->src_reg));
! 	}
!       else
! 	/* Iteration var must be an induction variable to get here.  */
! 	abort();
! 
!       if (INSN_UID (bl->biv->insn) < max_uid_for_loop
! 	  && INSN_LUID (bl->biv->insn) < INSN_LUID (loop->scan_start))
  	{
  	  if (loop_dump_stream)
  	    fprintf (loop_dump_stream,


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