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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 695 - (view) (download)

1 : leunga 695 (*
2 :     * View a scheduler DDG constructed for basic block scheduling
3 :     *
4 :     * -- Allen
5 :     *)
6 :     functor BasicBlockSchedulerDDGViewer
7 :     (structure GraphViewer : GRAPH_VIEWER
8 :     structure DDG : SCHEDULER_DDG
9 :     structure FormatInsn : FORMAT_INSTRUCTION
10 :     sharing FormatInsn.I = DDG.I
11 :     ) : BASIC_BLOCK_SCHEDULER_DDG_VIEWER =
12 :     struct
13 :    
14 :     structure DDG = DDG
15 :     structure I = DDG.I
16 :     structure L = GraphLayout
17 :    
18 :     val edgeColor = L.COLOR "red"
19 :    
20 :     val toString = FormatInsn.toString []
21 :    
22 :     fun view regmap ddg =
23 :     GraphViewer.view
24 :     (GraphLayout.makeLayout
25 :     {graph = fn _ => [],
26 :     node = fn (_,i) => [L.LABEL(toString regmap i)],
27 :     edge = fn (_,_,lat) => [L.LABEL(Int.toString lat),edgeColor]
28 :     }
29 :     ddg
30 :     )
31 :    
32 :     end

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