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]

[rtlopt] Use profile for ebb scheduling


Tue Dec 31 12:45:18 CET 2002  Jan Hubicka  <jh@suse.cz>
	* sched-ebb.c (rank):  Use frequencies.
Index: sched-ebb.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-ebb.c,v
retrieving revision 1.17.6.4
diff -c -3 -p -r1.17.6.4 sched-ebb.c
*** sched-ebb.c	31 Dec 2002 01:01:36 -0000	1.17.6.4
--- sched-ebb.c	31 Dec 2002 11:44:37 -0000
*************** static int
*** 152,157 ****
--- 152,166 ----
  rank (insn1, insn2)
       rtx insn1 ATTRIBUTE_UNUSED, insn2 ATTRIBUTE_UNUSED;
  {
+   basic_block bb1 = BLOCK_FOR_INSN (insn1);
+   basic_block bb2 = BLOCK_FOR_INSN (insn2);
+ 
+   if (bb1->count > bb2->count
+       || bb1->frequency > bb2->frequency)
+     return 1;
+   if (bb1->count < bb2->count
+       || bb1->frequency < bb2->frequency)
+     return -1;
    return 0;
  }
  


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