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

Diff of /sml/trunk/src/MLRISC/backpatch/spanDep.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 18  Line 18 
18                          where I = CFG.I                          where I = CFG.I
19       structure Props     : INSN_PROPERTIES       structure Props     : INSN_PROPERTIES
20                          where I = CFG.I                          where I = CFG.I
      structure Placement : BLOCK_PLACEMENT  
                         where CFG = CFG  
21       ) : BBSCHED =       ) : BBSCHED =
22  struct  struct
23    
# Line 33  Line 31 
31    structure G = Graph    structure G = Graph
32    structure A = Array    structure A = Array
33    
34      structure DefaultPlacement = DefaultBlockPlacement(CFG)
35      structure WeightedPlacement =
36         WeightedBlockPlacementFn(structure CFG = CFG structure InsnProps = Props)
37    
38      val placementFlag = MLRiscControl.getFlag "weighted-block-placement"
39      val blockPlacement =
40          if !placementFlag then WeightedPlacement.blockPlacement
41          else DefaultPlacement.blockPlacement
42    
43    fun error msg = MLRiscErrorMsg.error("SpanDependencyResolution",msg)    fun error msg = MLRiscErrorMsg.error("SpanDependencyResolution",msg)
44    
45    datatype code =    datatype code =
# Line 66  Line 73 
73      fun maxBlockId (CFG.BLOCK{id, ...}::rest, curr) =      fun maxBlockId (CFG.BLOCK{id, ...}::rest, curr) =
74         if id > curr then maxBlockId(rest, id) else maxBlockId(rest, curr)         if id > curr then maxBlockId(rest, id) else maxBlockId(rest, curr)
75       | maxBlockId([], curr) = curr       | maxBlockId([], curr) = curr
76      val blocks = map #2 (Placement.blockPlacement(cfg))      val blocks = map #2 (blockPlacement(cfg))
77      val N = maxBlockId(blocks, #capacity graph ())      val N = maxBlockId(blocks, #capacity graph ())
78    
79      (* Order of blocks in code layout *)      (* Order of blocks in code layout *)

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