Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis15/src/compiler/simplify/simple-opt.sml
ViewVC logotype

View of /branches/vis15/src/compiler/simplify/simple-opt.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3508 - (download) (annotate)
Fri Dec 18 14:19:30 2015 UTC (4 years, 3 months ago) by jhr
File size: 861 byte(s)
debugging translation
(* simple-opt.sml
 *
 * Optimization of the SimpleAST representation
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2015 The University of Chicago
 * All rights reserved.
 *)

structure SimpleOpt : sig

    val transform : Simple.program -> Simple.program

    val checkAfter : string * Simple.program -> Simple.program

  end = struct

    structure S = Simple

    val checkAfter = Log.after {
	    dumpCtl = Ctl.dumpSimple,
	    checkCtl = Ctl.dumpSimple,
	    output = SimplePP.output,
	    checkIR = CheckSimple.check
	  }

    fun transform prog = let
	  val prog = checkAfter ("inlining", Inliner.transform prog)
	  val prog = checkAfter ("contraction", SimpleContract.transform prog)
	  val prog = checkAfter ("simplify variables", SimplifyVars.transform prog)
	  in
	    prog
	  end

  end

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