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]

PATCH: bb reorder insn chaining fix


near obvious; x86 bootstrap and torture successful. 
acceptable?

	* bb-reorder.c (reorder_basic_blocks): Update PREV_INSN as well as
	NEXT_INSN. Update last insn in chain.


Index: bb-reorder.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/bb-reorder.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 bb-reorder.c
*** bb-reorder.c	2000/03/16 14:56:55	1.1
--- bb-reorder.c	2000/03/18 03:59:34
*************** reorder_basic_blocks ()
*** 765,771 ****
        rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
  					     REORDER_SKIP_AFTER);
        if (xafter)
! 	NEXT_INSN (xafter) = last_insn;
        else
  	abort();
      }
--- 765,781 ----
        rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
  					     REORDER_SKIP_AFTER);
        if (xafter)
! 	{
! 	  NEXT_INSN (xafter) = last_insn;
! 	  if (last_insn)
! 	    {
! 	      rtx x = last_insn;
! 	      PREV_INSN (last_insn) = xafter;
! 	      while (NEXT_INSN (x))
! 		x = NEXT_INSN (x);
! 	      set_last_insn (x);
! 	    }
! 	}
        else
  	abort();
      }

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