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

SCM Repository

[diderot] View of /trunk/src/compiler/driver/backend.sml
ViewVC logotype

View of /trunk/src/compiler/driver/backend.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1671 - (download) (annotate)
Sun Dec 4 10:56:10 2011 UTC (7 years, 7 months ago) by jhr
File size: 709 byte(s)
  Merging changes from pure-cfg branch back into trunk
(* backend.sml
 *
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *)

structure BackEnd : sig

    val generate : TargetUtil.target_desc -> string * LowIL.program -> unit

  end = struct

    fun pickBackend target = (case target
	   of TargetUtil.TARGET_C => CBackEnd.generate
	    | TargetUtil.TARGET_CL => CLBackEnd.generate 
	    | TargetUtil.TARGET_CUDA => raise Fail "CUDA not supported yet"
	  (* end case *))

    fun generate {target, parallel, double, debug} = let
	  val gen = pickBackend target
	  in
	    fn (basename, prog) => gen {
		basename=basename, double=double, parallel=parallel, debug=debug, prog=prog
	      }
	  end

  end

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