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]

flow.c : Allow unspec insns


This is a fix for breakage caused by calling verify_flow_info late in
compilation (after reorg).  We now have to be able to cope with the
unspec insns that are generated by machine dependent reorg.

Andrew.


2001-07-24  Andrew Haley  <aph@cambridge.redhat.com>

        * flow.c (verify_flow_info): Allow unspec insns after a label.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.438
diff -p -2 -c -r1.438 flow.c
*** flow.c	2001/07/24 08:54:59	1.438
--- flow.c	2001/07/24 15:42:33
*************** verify_flow_info ()
*** 8188,8192 ****
  		  x = NEXT_INSN (x);
  		}
! 
  	      /* But in any case, non-deletable labels can appear anywhere.  */
  	      break;
--- 8188,8206 ----
  		  x = NEXT_INSN (x);
  		}
! 	      else if (reload_completed)
! 		{
! 		  /* unspec insns don't necessarily need to be within
! 		     a basic block.  For example, SH gcc inserts
! 		     constants as unspecs in machine dependent reorg.
! 		     We don't expect to see them until after then,
! 		     hence the reload_completed condition.  */
! 		  while (x && GET_CODE (NEXT_INSN (x)) == INSN
! 			 && (GET_CODE (PATTERN (NEXT_INSN (x))) == UNSPEC
! 			     || (GET_CODE (PATTERN (NEXT_INSN (x))) 
! 				 == UNSPEC_VOLATILE)))
! 		    {
! 		      x = NEXT_INSN (x);
! 		    }
! 		}
  	      /* But in any case, non-deletable labels can appear anywhere.  */
  	      break;
*************** verify_flow_info ()
*** 8197,8201 ****
  	}
  
!       if (INSN_P (x)
  	  && GET_CODE (x) == JUMP_INSN
  	  && returnjump_p (x) && ! condjump_p (x)
--- 8211,8215 ----
  	}
  
!       if (x && INSN_P (x)
  	  && GET_CODE (x) == JUMP_INSN
  	  && returnjump_p (x) && ! condjump_p (x)
*************** verify_flow_info ()
*** 8203,8207 ****
  	    fatal_insn ("Return not followed by barrier", x);
  
!       x = NEXT_INSN (x);
      }
  
--- 8217,8222 ----
  	    fatal_insn ("Return not followed by barrier", x);
  
!       if (x)
! 	x = NEXT_INSN (x);
      }
  


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