Reporting fix in haifa-sched.c

Brad Lucier lucier@math.purdue.edu
Tue Oct 24 10:58:00 GMT 2000


In this patch to haifa-sched.c:

Revision 1.90 / (download) - annotate - [select for diffs] , Wed Jul 21 01:15:46 1999 UTC (15 months ago) by rth 
Branch: MAIN 
Changes since 1.89: +91 -104 lines
Diff to previous 1.89 (colored) 

        * haifa-sched.c (insn_cost): FREE implies cost 0 and vice versa.
        (adjust_priority): Always call ADJUST_PRIORITY.
        (schedule_insn): Only put insns into the ready at cost 0.
        (schedule_block): Remove redundant initial sort.  Give clock_var
        and can_issue_more to MD_SCHED_REORDER.  Requeue if hazard cost
        is not 0.
        * tm.texi (MD_SCHED_REORDER): Update docs.

        * sparc.h (MD_SCHED_REORDER): Update.  Set CAN_ISSUE_MORE.
        * sparc.c (ultra_reorder_called_this_block): Delete.
        (ultrasparc_sched_init): Don't set it.
        (ultrasparc_sched_reorder): Don't check it.

rth initialized clock_var to -1 instead of 0 in each block, but he
didn't change the way that total cycles/block are reported in the
.c.sched and .c.sched2 files.  I think the following change more
accurately reflects the number of cycles each block takes:

Brad Lucier

	* haifa-sched.c (schedule_block): Increment clock_var by one when
	reporting total clocks/basic block.

===================================================================
RCS file: RCS/haifa-sched.c,v
retrieving revision 1.1
diff -p -r1.1 haifa-sched.c
*** haifa-sched.c	2000/10/24 17:44:56	1.1
--- haifa-sched.c	2000/10/24 17:54:52
*************** schedule_block (bb, rgn_n_insns)
*** 6216,6222 ****
    if (sched_verbose)
      {
        fprintf (dump, ";;   total time = %d\n;;   new basic block head = %d\n",
! 	       clock_var, INSN_UID (BLOCK_HEAD (b)));
        fprintf (dump, ";;   new basic block end = %d\n\n",
  	       INSN_UID (BLOCK_END (b)));
      }
--- 6216,6222 ----
    if (sched_verbose)
      {
        fprintf (dump, ";;   total time = %d\n;;   new basic block head = %d\n",
! 	       clock_var + 1, INSN_UID (BLOCK_HEAD (b)));
        fprintf (dump, ";;   new basic block end = %d\n\n",
  	       INSN_UID (BLOCK_END (b)));
      }


More information about the Gcc-patches mailing list