public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [SH] Merge SCHED_REORDER macro into ready_reorder function
@ 2012-04-11 11:50 Oleg Endo
  2012-04-11 13:12 ` Kaz Kojima
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Endo @ 2012-04-11 11:50 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Hi,

The attached patch merges the SCHED_REORDER macro into the ready_reorder
function, since the macro is used only in that function.
Tested with 'make all-gcc'
OK?

Cheers,
Oleg


ChangeLog:
	
	* config/sh/sh.c (SCHED_REORDER): Merge macro into ...
	(ready_reorder): ... this function.



[-- Attachment #2: sh_sched_reorder.patch --]
[-- Type: text/x-patch, Size: 958 bytes --]

Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(revision 186311)
+++ gcc/config/sh/sh.c	(working copy)
@@ -10559,22 +10559,14 @@
   a[i + 1] = insn;
 }
 
-#define SCHED_REORDER(READY, N_READY)                                	\
-  do									\
-    {									\
-      if ((N_READY) == 2)						\
-	swap_reorder (READY, N_READY);					\
-      else if ((N_READY) > 2)						\
-	qsort (READY, N_READY, sizeof (rtx), rank_for_reorder);		\
-    }									\
-  while (0)
-
-/* Sort the ready list READY by ascending priority, using the SCHED_REORDER
-   macro.  */
+/* Sort the ready list by ascending priority.  */
 static void
 ready_reorder (rtx *ready, int nready)
 {
-  SCHED_REORDER (ready, nready);
+  if (nready == 2)
+    swap_reorder (ready, nready);
+  else if (nready > 2)
+     qsort (ready, nready, sizeof (rtx), rank_for_reorder);
 }
 
 /* Count life regions of r0 for a block.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [SH] Merge SCHED_REORDER macro into ready_reorder function
  2012-04-11 11:50 [SH] Merge SCHED_REORDER macro into ready_reorder function Oleg Endo
@ 2012-04-11 13:12 ` Kaz Kojima
  0 siblings, 0 replies; 2+ messages in thread
From: Kaz Kojima @ 2012-04-11 13:12 UTC (permalink / raw)
  To: oleg.endo; +Cc: gcc-patches

Oleg Endo <oleg.endo@t-online.de> wrote:
> The attached patch merges the SCHED_REORDER macro into the ready_reorder
> function, since the macro is used only in that function.
> Tested with 'make all-gcc'
> OK?

OK.

Regards,
	kaz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-11 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 11:50 [SH] Merge SCHED_REORDER macro into ready_reorder function Oleg Endo
2012-04-11 13:12 ` Kaz Kojima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).