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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/backpatch/vlBackPatch.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/backpatch/vlBackPatch.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1123, Thu Mar 7 19:13:25 2002 UTC revision 1124, Thu Mar 7 19:49:22 2002 UTC
# Line 33  Line 33 
33     structure CFG        : CONTROL_FLOW_GRAPH     structure CFG        : CONTROL_FLOW_GRAPH
34                          where I = Emitter.I                          where I = Emitter.I
35     structure Asm        : INSTRUCTION_EMITTER     structure Asm        : INSTRUCTION_EMITTER
36                          where I = CFG.I                          where I = CFG.I) =
    structure Placement  : BLOCK_PLACEMENT  
                         where CFG = CFG)  : BBSCHED =  
37  struct  struct
38    structure I   = Jumps.I    structure I   = Jumps.I
39    structure C   = I.C    structure C   = I.C
# Line 53  Line 51 
51    
52    datatype cluster = CLUSTER of {cluster: desc}    datatype cluster = CLUSTER of {cluster: desc}
53    
54      structure DefaultPlacement = DefaultBlockPlacement(CFG)
55      structure WeightedPlacement =
56         WeightedBlockPlacementFn(structure CFG = CFG structure InsnProps = Props)
57    
58      val placementFlag = MLRiscControl.getFlag "weighted-block-placement"
59    
60      val blockPlacement =
61          if !placementFlag then WeightedPlacement.blockPlacement
62          else DefaultPlacement.blockPlacement
63    
64    val maxIter = MLRiscControl.getInt "variable-length-backpatch-iterations"    val maxIter = MLRiscControl.getInt "variable-length-backpatch-iterations"
65    val _ = maxIter := 40    val _ = maxIter := 40
66    
# Line 63  Line 71 
71    fun cleanUp() = (clusterList := []; dataList := [])    fun cleanUp() = (clusterList := []; dataList := [])
72    
73    fun bbsched(cfg as G.GRAPH{graph_info=CFG.INFO{data, ...}, ...}) = let    fun bbsched(cfg as G.GRAPH{graph_info=CFG.INFO{data, ...}, ...}) = let
74      val blocks = map #2 (Placement.blockPlacement cfg)      val blocks = map #2 (blockPlacement cfg)
75      fun bytes([], p) = p      fun bytes([], p) = p
76        | bytes([s], p) = BYTES(s, p)        | bytes([s], p) = BYTES(s, p)
77        | bytes(s, p) = BYTES(W8V.concat s, p)        | bytes(s, p) = BYTES(W8V.concat s, p)

Legend:
Removed from v.1123  
changed lines
  Added in v.1124

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