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

[patch] mep: bundling fix, unneeded option


Minor fixes, committed.

	* config/mep/mep.opt (mfar): Remove -mfar as it doesn't do anything.

	* config/mep/mep.c (mep_bundle_insns): Account for the fact that
	the scheduler doesn't tag jump insns.

Index: config/mep/mep.opt
===================================================================
--- config/mep/mep.opt	(revision 148985)
+++ config/mep/mep.opt	(working copy)
@@ -80,16 +80,12 @@ Target InverseMask(LITTLE_ENDIAN) Reject
 Use big-endian byte order
 
 mel
 Target Mask(LITTLE_ENDIAN) RejectNegative
 Use little-endian byte order
 
-mfar
-Target RejectNegative
-Enable -ml, -mtf, and -mc=far
-
 mio-volatile
 Target Mask(IO_VOLATILE) 
 __io vars are volatile by default
 
 ml
 Target Mask(L) RejectNegative
Index: config/mep/mep.c
===================================================================
--- config/mep/mep.c	(revision 148985)
+++ config/mep/mep.c	(working copy)
@@ -6922,23 +6922,25 @@ mep_bundle_insns (rtx insns)
     return;
 
   /* The first insn in a bundle are TImode, the remainder are
      VOIDmode.  After this function, the first has VOIDmode and the
      rest have BImode.  */
 
+  /* Note: this doesn't appear to be true for JUMP_INSNs.  */
+
   /* First, move any NOTEs that are within a bundle, to the beginning
      of the bundle.  */
   for (insn = insns; insn ; insn = NEXT_INSN (insn))
     {
       if (NOTE_P (insn) && first)
 	/* Don't clear FIRST.  */;
 
-      else if (INSN_P (insn) && GET_MODE (insn) == TImode)
+      else if (NONJUMP_INSN_P (insn) && GET_MODE (insn) == TImode)
 	first = insn;
 
-      else if (INSN_P (insn) && GET_MODE (insn) == VOIDmode && first)
+      else if (NONJUMP_INSN_P (insn) && GET_MODE (insn) == VOIDmode && first)
 	{
 	  rtx note, prev;
 
 	  /* INSN is part of a bundle; FIRST is the first insn in that
 	     bundle.  Move all intervening notes out of the bundle.
 	     In addition, since the debug pass may insert a label
@@ -6965,23 +6967,23 @@ mep_bundle_insns (rtx insns)
 		}
 
 	      note = prev;
 	    }
 	}
 
-      else if (!INSN_P (insn))
+      else if (!NONJUMP_INSN_P (insn))
 	first = 0;
     }
 
   /* Now fix up the bundles.  */
   for (insn = insns; insn ; insn = NEXT_INSN (insn))
     {
       if (NOTE_P (insn))
 	continue;
 
-      if (!INSN_P (insn))
+      if (!NONJUMP_INSN_P (insn))
 	{
 	  last = 0;
 	  continue;
 	}
 
       /* If we're not optimizing enough, there won't be scheduling
@@ -6998,20 +7000,20 @@ mep_bundle_insns (rtx insns)
 	  /* IVC2 slots are scheduled by DFA, so we just accept
 	     whatever the scheduler gives us.  However, we must make
 	     sure the core insn (if any) is the first in the bundle.
 	     The IVC2 assembler can insert whatever NOPs are needed,
 	     and allows a COP insn to be first.  */
 
-	  if (INSN_P (insn)
+	  if (NONJUMP_INSN_P (insn)
 	      && GET_CODE (PATTERN (insn)) != USE
 	      && GET_MODE (insn) == TImode)
 	    {
 	      for (last = insn;
 		   NEXT_INSN (last)
 		     && GET_MODE (NEXT_INSN (last)) == VOIDmode
-		     && INSN_P (NEXT_INSN (last));
+		     && NONJUMP_INSN_P (NEXT_INSN (last));
 		   last = NEXT_INSN (last))
 		{
 		  if (core_insn_p (last))
 		    core_insn = last;
 		}
 	      if (core_insn_p (last))


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