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/backpatch.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/backpatch/backpatch.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 13  Line 13 
13                             and P = Emitter.S.P                             and P = Emitter.S.P
14       structure Jumps   : SDI_JUMPS       structure Jumps   : SDI_JUMPS
15                          where I = CFG.I                          where I = CFG.I
16       structure Placement : BLOCK_PLACEMENT       structure Props   : INSN_PROPERTIES
17                          where CFG=CFG                          where I = CFG.I
18      ) =      ) =
19  struct  struct
20    
# Line 26  Line 26 
26    structure J = Jumps    structure J = Jumps
27    structure P = CFG.P    structure P = CFG.P
28    
29      structure DefaultPlacement = DefaultBlockPlacement(CFG)
30      structure WeightedPlacement =
31         WeightedBlockPlacementFn(structure CFG = CFG structure InsnProps = Props)
32    
33      val placementFlag = MLRiscControl.getFlag "weighted-block-placement"
34      val blockPlacement =
35          if !placementFlag then WeightedPlacement.blockPlacement
36          else DefaultPlacement.blockPlacement
37    
38    fun error msg = MLRiscErrorMsg.error("BBSched",msg)    fun error msg = MLRiscErrorMsg.error("BBSched",msg)
39    
40    datatype code =    datatype code =
# Line 46  Line 55 
55    fun cleanUp() = (clusterList := []; dataList := [])    fun cleanUp() = (clusterList := []; dataList := [])
56    
57    fun bbsched(cfg as G.GRAPH{graph_info=CFG.INFO{data, ...}, ...}) = let    fun bbsched(cfg as G.GRAPH{graph_info=CFG.INFO{data, ...}, ...}) = let
58      val blocks = map #2 (Placement.blockPlacement cfg)      val blocks = map #2 (blockPlacement cfg)
59    
60      fun compress [] = []      fun compress [] = []
61        | compress(CFG.BLOCK{align, labels, insns, ...} :: rest) = let        | compress(CFG.BLOCK{align, labels, insns, ...} :: rest) = let

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