Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/scheduling/clusterBBScheduler.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/scheduling/clusterBBScheduler.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 695 - (view) (download)

1 : leunga 695 (*
2 :     * Simple minded basic block scheduling
3 :     *)
4 :     functor ClusterBasicBlockScheduler
5 :     (structure Flowgraph : FLOWGRAPH
6 :     structure BBSched : BASIC_BLOCK_SCHEDULER
7 :     sharing Flowgraph.I = BBSched.I
8 :     val cpu : string ref
9 :     ) : CLUSTER_OPTIMIZATION =
10 :     struct
11 :    
12 :     structure F = Flowgraph
13 :     type flowgraph = F.cluster
14 :    
15 :     val name = "Basic Block Scheduling"
16 :    
17 :     fun run(cluster as F.CLUSTER{blocks, regmap, annotations, ...}) =
18 :     if #contains MLRiscAnnotations.NO_OPTIMIZATION (!annotations)
19 :     then cluster
20 :     else
21 :     let val regmap = F.I.C.lookup regmap
22 :     val schedule = BBSched.schedule {regmap=regmap, cpu= !cpu}
23 :     fun sched(F.BBLOCK{annotations, insns, ...}) =
24 :     if #contains MLRiscAnnotations.NO_OPTIMIZATION (!annotations)
25 :     then ()
26 :     else insns := schedule(! insns)
27 :     | sched _ = ()
28 :     in app sched blocks;
29 :     cluster
30 :     end
31 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0