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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/tree-ir/tree-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/tree-ir/tree-ir.sml

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

revision 3848, Thu May 12 14:30:19 2016 UTC revision 3952, Sat Jun 11 17:20:27 2016 UTC
# Line 15  Line 15 
15      structure Op = TreeOps      structure Op = TreeOps
16      structure Ty = TreeTypes      structure Ty = TreeTypes
17    
18        type target_info = {
19            layout : int -> TreeTypes.vec_layout,
20            isInline : LowOps.rator -> bool
21          }
22    
23      datatype program = Program of {      datatype program = Program of {
24          props : Properties.t list,          props : Properties.t list,
25            target : target_info,           (* target-specific info about representation invariants *)
26          consts : global_var list,       (* large constant variables *)          consts : global_var list,       (* large constant variables *)
27          inputs : input list,            (* global input variables *)          inputs : input list,            (* global input variables *)
28          constInit : block,              (* code that initializes constants and inputs *)          constInit : block,              (* code that initializes constants and inputs *)
# Line 31  Line 37 
37          name : Atom.atom,          name : Atom.atom,
38          params : var list,          params : var list,
39          state : state_var list,          state : state_var list,
40          stateInit : block,          stateInit : method,
41          initM : block option,          initM : method option,
42          updateM : block,          updateM : method,
43          stabilizeM : block option          stabilizeM : method option
44          }
45    
46        and method = Method of {
47              usesGlobals : bool,           (* does the method contain references to globals? *)
48              needsWorld : bool,            (* does the method need the world (e.g., to print) *)
49              body : block                  (* the method body *)
50        }        }
51    
52      and create = Create of {      and create = Create of {
# Line 49  Line 61 
61    
62      and stm      and stm
63        = S_Comment of string list        = S_Comment of string list
64        | S_Unpack of var list * exp      (* unpack vector pieces into local variables *)        | S_Assign of bool * var * exp    (* assignment; the boolean is true for var decls *)
       | S_Assign of var * exp  
65        | S_MAssign of var list * exp        | S_MAssign of var list * exp
66        | S_GAssign of global_var * exp        | S_GAssign of global_var * exp
67        | S_IfThen of exp * block        | S_IfThen of exp * block
68        | S_IfThenElse of exp * block * block        | S_IfThenElse of exp * block * block
69          | S_For of var * exp * exp * block
70        | S_Foreach of var * exp * block        | S_Foreach of var * exp * block
71      (* special Diderot forms *)      (* special Diderot forms *)
72        | S_LoadNrrd of var * string        | S_LoadNrrd of var * APITypes.t * string
73        | S_Input of global_var * string * string option * exp option (* get input *)        | S_Input of global_var * string * string option * exp option (* get input *)
74        | S_InputNrrd of global_var * string * string option * string option (* get image/seq input *)        | S_InputNrrd of global_var * string * string option * string option (* get image/seq input *)
75        | S_New of Atom.atom * exp list   (* new strand creation *)        | S_New of Atom.atom * exp list   (* new strand creation *)
# Line 71  Line 83 
83    
84      and exp      and exp
85        = E_Global of global_var        = E_Global of global_var
86        | E_State of var option * state_var        | E_State of exp option * state_var
87        | E_Var of var        | E_Var of var
88        | E_Lit of Literal.t        | E_Lit of Literal.t
89        | E_Op of Op.rator * exp list        | E_Op of Op.rator * exp list
90        | E_Cons of exp list * Ty.t        | E_Vec of int * int * exp list           (* vector value; the ints are the width and the
91                                                     * padded width
92                                                     *)
93          | E_Cons of exp list * Ty.t               (* in-memory tensor value *)
94        | E_Seq of exp list * Ty.t        | E_Seq of exp list * Ty.t
95        | E_Pack of exp list              (* pack vector pieces into composite vector value *)        | E_Pack of Ty.vec_layout * exp list      (* pack vector pieces into composite vector value *)
96        | E_VLoad of Ty.vec_layout * exp * int (* load a piece of a composite vector value *)        | E_VLoad of Ty.vec_layout * exp * int    (* load a piece of a composite vector value from
97                                                     * a tensor.  The integer specifies the index of
98                                                     * the piece.
99                                                     *)
100    
101      and global_var = GV of {      and global_var = GV of {
102          name : string,                  (* name (should be unique) *)          name : string,                  (* name (should be unique) *)

Legend:
Removed from v.3848  
changed lines
  Added in v.3952

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