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

View of /sml/trunk/src/MLRISC/cluster/clusterExpandCopies.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 796 - (download) (annotate)
Tue Mar 6 00:04:33 2001 UTC (19 years, 3 months ago) by leunga
File size: 686 byte(s)

   Support for alternative control-flow, exception handlers added.
(*
 * This module expands all parallel copies into normal instructions
 *)
functor ClusterExpandCopies
   (structure Flowgraph    : FLOWGRAPH
    structure ExpandCopies : EXPAND_COPIES
       sharing Flowgraph.I = ExpandCopies.I
   ) : CLUSTER_OPTIMIZATION =
struct
   structure F = Flowgraph
   type flowgraph = F.cluster

   val name = "expand copies"

   fun run(cluster as F.CLUSTER{blocks, ...}) =
       (app (fn F.BBLOCK{insns, ...} =>
                insns :=  
                  List.foldr (fn (i, rest) =>
                      List.revAppend(ExpandCopies.expandCopies i,rest)) []
                        (!insns)
              | _ => ()) blocks;
        cluster
       )
end

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