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]

Refine check in global.c:build_insn_chain


After discussions with RTH, it became clear that the jump table is not
part of any basic block and so can validly be after the last basic
block.  This suppresses that abort.  The test case is the Ada validation
test A87B59A on 64-bit Sparc for VxWorks.

Thu Jun  7 16:17:40 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* global.c (build_insn_chain): Allow ADDR_VEC or ADDR_DIF_VEC after
	end of last block if last real insn is a JUMP_INSN.

*** global.c	2001/04/03 15:05:22	1.66
--- global.c	2001/06/07 20:13:35
*************** build_insn_chain (first)
*** 1852,1860 ****
  
  	 We may want to reorganize the loop somewhat since this test should
! 	 always be the right exit test.  */
        if (b == n_basic_blocks)
  	{
  	  for (first = NEXT_INSN (first) ; first; first = NEXT_INSN (first))
! 	    if (INSN_P (first) && GET_CODE (PATTERN (first)) != USE)
  	      abort ();
  	  break;
--- 1852,1866 ----
  
  	 We may want to reorganize the loop somewhat since this test should
! 	 always be the right exit test.  Allow an ADDR_VEC or ADDR_DIF_VEC if
! 	 the previous real insn is a JUMP_INSN.  */
        if (b == n_basic_blocks)
  	{
  	  for (first = NEXT_INSN (first) ; first; first = NEXT_INSN (first))
! 	    if (INSN_P (first)
! 		&& GET_CODE (PATTERN (first)) != USE
! 		&& ! ((GET_CODE (PATTERN (first)) == ADDR_VEC
! 		       || GET_CODE (PATTERN (first)) == ADDR_DIFF_VEC)
! 		      && prev_real_insn (first) != 0
! 		      && GET_CODE (prev_real_insn (first)) == JUMP_INSN))
  	      abort ();
  	  break;


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