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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/codegen/target-spec.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/codegen/target-spec.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3812, Wed May 4 13:16:31 2016 UTC revision 3864, Mon May 16 13:23:38 2016 UTC
# Line 1  Line 1 
1  (* target-spec.sml  (* target-spec.sml
2   *   *
3     * Properties, including the target description, that affect code generation.
4     *
5   * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)   * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
6   *   *
7   * COPYRIGHT (c) 2016 The University of Chicago   * COPYRIGHT (c) 2016 The University of Chicago
# Line 16  Line 18 
18          diderotc : string,              (* the diderotc command used to invoke this compiler *)          diderotc : string,              (* the diderotc command used to invoke this compiler *)
19          argv : string list,             (* command-line arguments used to invoke this compiler *)          argv : string list,             (* command-line arguments used to invoke this compiler *)
20          version : string,               (* version message string for this compiler *)          version : string,               (* version message string for this compiler *)
21          (* properties from the target options *)
22          srcFile : string,               (* source filename *)          srcFile : string,               (* source filename *)
23          outDir : string,                (* directory to put output *)          outDir : string,                (* directory to put output *)
24          outBase : string,               (* basename for output or name of executable *)          outBase : string,               (* basename for output or name of executable *)
# Line 25  Line 28 
28          namespace : string,             (* optional namespace prefix *)          namespace : string,             (* optional namespace prefix *)
29          double : bool,                  (* true for double-precision candidates *)          double : bool,                  (* true for double-precision candidates *)
30          longint : bool,                 (* true for 64-bit integers (not currently used) *)          longint : bool,                 (* true for 64-bit integers (not currently used) *)
31            scalar : bool,                  (* true if scalar code (not SSE) should be generated *)
32          debug : bool,                   (* true if debugging of the target is enabled *)          debug : bool,                   (* true if debugging of the target is enabled *)
33          bsp : bool,                     (* true if BSP style execution should always be used *)          bsp : bool,                     (* true if BSP style execution should always be used *)
34        (* properties from analysing the program *)        (* properties from analysing the program *)
# Line 41  Line 45 
45          hasReduce : bool                (* true for programs that have global reduce *)          hasReduce : bool                (* true for programs that have global reduce *)
46        }        }
47    
   
48    (* create the property record from the target description and program properties *)    (* create the property record from the target description and program properties *)
49      fun mk (tgt : TargetOptions.t, props : Properties.t list) : t = {      fun mk (tgt : TargetOptions.t, props : Properties.t list) : t = {
50              diderotc = CommandLine.name(),              diderotc = CommandLine.name(),
# Line 56  Line 59 
59              namespace = #namespace tgt,              namespace = #namespace tgt,
60              double = #double tgt,              double = #double tgt,
61              longint = #longint tgt,              longint = #longint tgt,
62                scalar = #scalar tgt,
63              debug = #debug tgt,              debug = #debug tgt,
64              bsp = #bsp tgt,              bsp = #bsp tgt,
65              hasGlobals = Properties.hasProp Properties.HasGlobals props,              hasGlobals = TargetOptions.hasProp TargetOptions.HasGlobals props,
66              hasInputs = Properties.hasProp Properties.HasInputs props,              hasInputs = TargetOptions.hasProp TargetOptions.HasInputs props,
67              isArray = Properties.hasProp Properties.StrandArray props,              isArray = TargetOptions.hasProp TargetOptions.StrandArray props,
68              hasDynSeq = Properties.hasProp Properties.DynamicSeq props,              hasDynSeq = TargetOptions.hasProp TargetOptions.DynamicSeq props,
69              hasStabilize = Properties.hasProp Properties.HasStabilizeMethod props,              hasStabilize = TargetOptions.hasProp TargetOptions.HasStabilizeMethod props,
70              hasDie = Properties.hasProp Properties.StrandsMayDie props,              hasDie = TargetOptions.hasProp TargetOptions.StrandsMayDie props,
71              hasNew = Properties.hasProp Properties.NewStrands props,              hasNew = TargetOptions.hasProp TargetOptions.NewStrands props,
72              hasCom = Properties.hasProp Properties.StrandCommunication props,              hasCom = TargetOptions.hasProp TargetOptions.StrandCommunication props,
73              hasReduce = Properties.hasProp Properties.GlobalReduce props              hasReduce = TargetOptions.hasProp TargetOptions.GlobalReduce props
74            }            }
75    
76    (* returns false if BSP style execution should always be used;    (* returns false if BSP style execution should always be used;
# Line 84  Line 88 
88    (* convert a target specification to the name of the runtime library *)    (* convert a target specification to the name of the runtime library *)
89      fun runtimeName (spec : t) = let      fun runtimeName (spec : t) = let
90            val l = if #debug spec then ["-debug.o"] else [".o"]            val l = if #debug spec then ["-debug.o"] else [".o"]
           val p = if #double spec then "-d" else "-f"  
91            val t = (case #platform spec            val t = (case #platform spec
92                   of SEQUENTIAL => "-seq"                   of SEQUENTIAL => "-seq"
93                    | PARALLEL => "-par"                    | PARALLEL => "-par"

Legend:
Removed from v.3812  
changed lines
  Added in v.3864

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