[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axp-redhat
Subject:    Re: ev4sched---here it is
From:       "Harald Koenig" <koenig () tat ! physik ! uni-tuebingen ! de>
Date:       1996-04-30 8:19:15
[Download RAW message or body]


> OK, there seems to be considerable interest in the EV4 scheduler.  It
> was posted to the net (if memory serves) a few years ago.  It's
> probably still somewhere on one of DEC's ftp site.
> 
> In any case, I put up a tar file on azstarnet:
> 
>  ftp://ftp.azstarnet.com/pub/linux/axp/misc/axpsrc-ev4sched-0.0.tar.gz
> 
> If somebody wanted to improve it, the first thing to do would be to
> add support for multiple basic blocks.

below is a vrey primitive patch which just passes bigger blocks in
chunks of 512 words.

might be a dump question (I've no real ideas about the problems of writing
a compiler or good code generator):

wouldn't it be easy (or ar least doable) to include this scheduler into the
GCC and get a considerable improvement in performace ?
this can be done either in the code generator stage of gcc (from C to ASM)
or in the assembler itself.  or what about a postprocessing program which
just rewrites binaries ?

since this scheduler is available for quite some time and this hasn't been
done already I assume there is a major problem in this easy thinging aproach.
but which one ?


Harald

-------------------------------------------------------------------------------
diff -u ORIG/ev4sched.c ./ev4sched.c
--- ORIG/ev4sched.c	Wed Apr 24 17:04:04 1996
+++ ./ev4sched.c	Fri Apr 26 20:42:03 1996
@@ -121,7 +121,12 @@
 			    argv[0], argv[i]);
 		    goto cleanup;
 		}
-		schedule_bb_ev4(insts, shdr.s_size/4, offset, reorder);
+		{
+		  int i;
+		  for(i=0; i&lt;shdr.s_size/4; i+= 512) {
+		    schedule_bb_ev4(insts+i, i+512&lt;shdr.s_size/4 ? 512 : shdr.s_size/4-i, offset, reorder);
+		  }
+		}
 	    }
 	    fseek(infp, next_section, SEEK_SET);
 	}
diff -u ORIG/instr-sched.c ./instr-sched.c
--- ORIG/instr-sched.c	Sun Jul 16 07:02:25 1995
+++ ./instr-sched.c	Fri Apr 26 20:32:12 1996
@@ -1782,7 +1782,7 @@
 static unsigned find_node_to_dual_issue (unsigned cycle, unsigned last_node, boolean reorder);
 static void     add_arc (unsigned node1, unsigned node2, unsigned latency);
 static void     mark_ending_nodes ();
-static int      sort_node_value (void *ent1, void *ent2);
+static int      sort_node_value (const void *ent1, const void *ent2);
 static void     compute_aftercycles ();
 static void     addres (boolean def, unsigned resource, enum resource_class class);
 static void     resource_constraints (unsigned resource);
@@ -1844,7 +1844,10 @@
   /*
   ** Clip the number of nodes to the maximum the scheduler can handle.
   */
-  assert (number &lt;= MAX_NODES);
+  if (!(number &lt;= MAX_NODES)) {
+    printf("number=%d MAX_NODES=%d,  ",number,MAX_NODES);
+    assert (number &lt;= MAX_NODES);
+  }
   number_of_nodes = number;
   /*
   **	Copy instructions to buffer and work from that
@@ -2139,7 +2142,7 @@
 **	Function used as callback routine by the library routine qsort
 **	to create a sort the array of node_value structures.
 */
-static int sort_node_value (void *ent1, void *ent2)
+static int sort_node_value (const void *ent1, const void *ent2)
 {
   struct node_value_s *sort1, *sort2;
 



-- 
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      &lt;_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic