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]

Fix PR bootstrap/52287


This fixes the recent bootstrap failure of the mainline on SPARC/Solaris 8 by 
stabilizing the sort of the ready list of the Haïfa scheduler in the presence 
of debug insns.

Bootstrapped/regtested on SPARC/Solaris 8 and x86-64/Linux, pre-approved by 
Bernd, applied on the mainline.


2012-02-23  Eric Botcazou  <ebotcazou@adacore.com>

	PR bootstrap/52287
	* haifa-sched.c (rank_for_schedule): Stabilize sort for debug insns.


-- 
Eric Botcazou

-- 
Eric Botcazou
Index: haifa-sched.c
===================================================================
--- haifa-sched.c	(revision 184352)
+++ haifa-sched.c	(working copy)
@@ -1647,8 +1647,10 @@ rank_for_schedule (const void *x, const
       /* Schedule debug insns as early as possible.  */
       if (DEBUG_INSN_P (tmp) && !DEBUG_INSN_P (tmp2))
 	return -1;
-      else if (DEBUG_INSN_P (tmp2))
+      else if (!DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2))
 	return 1;
+      else if (DEBUG_INSN_P (tmp) && DEBUG_INSN_P (tmp2))
+	return INSN_LUID (tmp) - INSN_LUID (tmp2);
     }
 
   /* The insn in a schedule group should be issued the first.  */

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