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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 591 - (download) (annotate)
Mon Apr 3 01:19:20 2000 UTC (19 years, 6 months ago) by leunga
File size: 536 byte(s)

   1. Renamed the constructor CALL in MLTREE by popular demand.
   2. Added a bunch of files from my repository.  These are currently
      used by other non-SMLNJ backends.
(*
 * Run peephole optimization on a cluster
 *)
functor ClusterPeephole
  (structure F        : FLOWGRAPH
   structure PeepHole : PEEPHOLE
     sharing F.I = PeepHole.I
  ) : CLUSTER_OPTIMIZATION =
struct
   structure F = F
   type flowgraph = F.cluster

   val name = "Peephole optimization"

   fun run(cluster as F.CLUSTER{blocks, regmap, ...}) =
   let val peephole = PeepHole.peephole (F.I.C.lookup regmap)
   in  app (fn F.BBLOCK{insns, ...} => insns := peephole(!insns)
             | _ => ()) blocks;
       cluster
   end
end

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