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 3832, Fri May 6 15:08:12 2016 UTC revision 3924, Fri Jun 3 17:30: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 43  Line 49 
49        }        }
50    
51      and block = Block of {      and block = Block of {
52          locals : var list,          locals : var list ref,          (* the local variables that are used in this block *)
53          body : stm list          body : stm list
54        }        }
55    
56      and stm      and stm
57        = S_Comment of string list        = S_Comment of string list
58        | 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 *)
59        | S_Assign of var * exp        | S_MAssign of var list * exp
60        | S_GAssign of global_var * exp        | S_GAssign of global_var * exp
61        | S_IfThen of exp * block        | S_IfThen of exp * block
62        | S_IfThenElse of exp * block * block        | S_IfThenElse of exp * block * block
63          | S_For of var * exp * exp * block
64        | S_Foreach of var * exp * block        | S_Foreach of var * exp * block
65      (* special Diderot forms *)      (* special Diderot forms *)
66        | S_LoadNrrd of var * string        | S_LoadNrrd of var * APITypes.t * string
67        | S_Input of global_var * string * string option * exp option (* get input *)        | S_Input of global_var * string * string option * exp option (* get input *)
68        | 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 *)
69        | S_New of Atom.atom * exp list   (* new strand creation *)        | S_New of Atom.atom * exp list   (* new strand creation *)
70        | S_Save of state_var * exp  (* save strand state *)        | S_Save of state_var * exp  (* save strand state *)
71        | S_Exit of exp list        | S_Exit
72        | S_Print of Ty.t list * exp list        | S_Print of Ty.t list * exp list
73      (* return functions for methods *)      (* return functions for methods *)
74        | S_Active        | S_Active
# Line 70  Line 77 
77    
78      and exp      and exp
79        = E_Global of global_var        = E_Global of global_var
80        | E_State of state_var        | E_State of exp option * state_var
81        | E_Var of var        | E_Var of var
82        | E_Lit of Literal.t        | E_Lit of Literal.t
83        | E_Op of Op.rator * exp list        | E_Op of Op.rator * exp list
84        | E_Cons of exp list * Ty.t        | E_Vec of int * int * exp list           (* vector value; the ints are the width and the
85                                                     * padded width
86                                                     *)
87          | E_Cons of exp list * Ty.t               (* in-memory tensor value *)
88        | E_Seq of exp list * Ty.t        | E_Seq of exp list * Ty.t
89        | 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 *)
90        | E_Select of exp * int           (* select vector piece of composite vector value *)        | E_VLoad of Ty.vec_layout * exp * int    (* load a piece of a composite vector value from
91                                                     * a tensor.  The integer specifies the index of
92                                                     * the piece.
93                                                     *)
94    
95      and global_var = GV of {      and global_var = GV of {
96          name : string,                  (* name (should be unique) *)          name : string,                  (* name (should be unique) *)

Legend:
Removed from v.3832  
changed lines
  Added in v.3924

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