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 /MLRISC/trunk/block-placement/jump-chain-elim-fn.sml
ViewVC logotype

Diff of /MLRISC/trunk/block-placement/jump-chain-elim-fn.sml

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

revision 1163, Fri Mar 22 15:32:30 2002 UTC revision 1164, Fri Mar 22 15:32:57 2002 UTC
# Line 54  Line 54 
54      fun run (cfg, blocks) = let      fun run (cfg, blocks) = let
55            val G.GRAPH{            val G.GRAPH{
56                    node_info, out_edges, set_out_edges, in_edges,                    node_info, out_edges, set_out_edges, in_edges,
57                    entries, exits, forall_nodes, remove_node, ...                    forall_nodes, remove_node, ...
58                  } = cfg                  } = cfg
59            val chainEscapes = !chainEscapes            val chainEscapes = !chainEscapes
60            val reverseDirection = !reverseDirection            val reverseDirection = !reverseDirection
# Line 63  Line 63 
63           *)           *)
64            val needFilter = ref false            val needFilter = ref false
65          (* the exit block *)          (* the exit block *)
66            val [exit] = exits()            val exit = CFG.exitId cfg
67          (* map a block ID to a label *)          (* map a block ID to a label *)
68            fun labelOf blkId = (case node_info blkId            fun labelOf blkId = (case node_info blkId
69                   of CFG.BLOCK{labels=ref(lab::_), ...} => lab                   of CFG.BLOCK{labels=ref(lab::_), ...} => lab
# Line 152  Line 152 
152                    (* end case *)                    (* end case *)
153                  end                  end
154              | doBlock _ = ()              | doBlock _ = ()
155            val [entry] = entries()            val entry = CFG.entryId cfg
156            fun keepBlock (blkId, _) =            fun keepBlock (blkId, _) =
157                  if null(in_edges blkId) andalso (blkId <> entry)                  if null(in_edges blkId) andalso (blkId <> entry)
158                    then (remove_node blkId; false)                    then (remove_node blkId; false)

Legend:
Removed from v.1163  
changed lines
  Added in v.1164

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