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

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/scheduling/bbDDGViewer.sml
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 775 - (download) (annotate)
Fri Jan 12 01:17:51 2001 UTC (18 years, 5 months ago) by leunga
File size: 777 byte(s)

    Merging the types labexp and mltree.
    tag leunga-20010111-labexp=mltree
(*
 * View a scheduler DDG constructed for basic block scheduling
 *
 * -- Allen
 *)
functor BasicBlockSchedulerDDGViewer
   (structure GraphViewer : GRAPH_VIEWER
    structure DDG         : SCHEDULER_DDG
    structure FormatInsn  : FORMAT_INSTRUCTION
      sharing FormatInsn.I = DDG.I 
   ) : BASIC_BLOCK_SCHEDULER_DDG_VIEWER =
struct

   structure DDG = DDG
   structure I   = DDG.I
   structure L   = GraphLayout

   val edgeColor = L.COLOR "red"

   val toString = FormatInsn.toString [] 

   fun view ddg =
       GraphViewer.view 
         (GraphLayout.makeLayout
           {graph = fn _ => [],
            node  = fn (_,i) => [L.LABEL(toString i)],
            edge  = fn (_,_,lat) => [L.LABEL(Int.toString lat),edgeColor] 
           }
           ddg
         )

end

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