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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3349 - (view) (download)

1 : jhr 1232 (* backend.sml
2 :     *
3 : jhr 3349 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     *
5 :     * COPYRIGHT (c) 2015 The University of Chicago
6 : jhr 1232 * All rights reserved.
7 :     *)
8 :    
9 :     structure BackEnd : sig
10 :    
11 : jhr 2486 (* generic interface to backend codegenerators. The first argument specifies the
12 :     * target
13 :     *)
14 : jhr 1232 val generate : TargetUtil.target_desc -> string * LowIL.program -> unit
15 :    
16 :     end = struct
17 :    
18 :     fun pickBackend target = (case target
19 :     of TargetUtil.TARGET_C => CBackEnd.generate
20 : jhr 1671 | TargetUtil.TARGET_CL => CLBackEnd.generate
21 : jhr 1232 | TargetUtil.TARGET_CUDA => raise Fail "CUDA not supported yet"
22 :     (* end case *))
23 :    
24 :     fun generate {target, parallel, double, debug} = let
25 :     val gen = pickBackend target
26 :     in
27 :     fn (basename, prog) => gen {
28 :     basename=basename, double=double, parallel=parallel, debug=debug, prog=prog
29 :     }
30 :     end
31 :    
32 :     end

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