PATCH: bb reorder insn chaining fix

Jason Eckhardt jle@cygnus.com
Fri Mar 17 20:07:00 GMT 2000


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();
      }


More information about the Gcc-patches mailing list