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

SCM Repository

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

Diff of /branches/vis15/src/compiler/codegen/collect-info.sml

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

revision 3954, Sat Jun 11 17:59:55 2016 UTC revision 3955, Sun Jun 12 15:55:01 2016 UTC
# Line 37  Line 37 
37        | VLoad of int * int        | VLoad of int * int
38        | VCons of int * int        | VCons of int * int
39        | VPack of TreeTypes.vec_layout        | VPack of TreeTypes.vec_layout
40          | TensorCopy of int list
41    
42      val collect : TreeIR.program -> t      val collect : TreeIR.program -> t
43    
# Line 64  Line 65 
65        | VLoad of int * int        | VLoad of int * int
66        | VCons of int * int        | VCons of int * int
67        | VPack of TreeTypes.vec_layout        | VPack of TreeTypes.vec_layout
68          | TensorCopy of int list
69    
70      structure OpTbl = HashTableFn (      structure OpTbl = HashTableFn (
71        struct        struct
# Line 84  Line 86 
86                  | VLoad(w, _) => 0w61 + 0w7 * Word.fromInt w                  | VLoad(w, _) => 0w61 + 0w7 * Word.fromInt w
87                  | VCons(w, _) => 0w67 + 0w7 * Word.fromInt w                  | VCons(w, _) => 0w67 + 0w7 * Word.fromInt w
88                  | VPack{wid, ...} => 0w71 + 0w7 * Word.fromInt wid                  | VPack{wid, ...} => 0w71 + 0w7 * Word.fromInt wid
89                    | TensorCopy dd => 0w79 + List.foldl (fn (i, s) => (Word.fromInt i + 0w3*s)) 0w0 dd
90                (* end case *))                (* end case *))
91          fun sameKey (op1, op2) = (case (op1, op2)          fun sameKey (op1, op2) = (case (op1, op2)
92                 of (RClamp, RClamp) => true                 of (RClamp, RClamp) => true
# Line 101  Line 104 
104                  | (VLoad(w1, _), VLoad(w2, _)) => (w1 = w2)                  | (VLoad(w1, _), VLoad(w2, _)) => (w1 = w2)
105                  | (VCons(w1, _), VCons(w2, _)) => (w1 = w2)                  | (VCons(w1, _), VCons(w2, _)) => (w1 = w2)
106                  | (VPack{wid=w1, ...}, VPack{wid=w2, ...}) => (w1 = w2)                  | (VPack{wid=w1, ...}, VPack{wid=w2, ...}) => (w1 = w2)
107                    | (TensorCopy dd1, TensorCopy dd2) => ListPair.allEq (op =) (dd1, dd2)
108                  | _ => false                  | _ => false
109                (* end case *))                (* end case *))
110        end)        end)
# Line 161  Line 165 
165                    | Op.VRound(w, pw) => insert (VRound(w, pw))                    | Op.VRound(w, pw) => insert (VRound(w, pw))
166                    | Op.VTrunc(w, pw) => insert (VTrunc(w, pw))                    | Op.VTrunc(w, pw) => insert (VTrunc(w, pw))
167                    | Op.VToInt(w, pw) => insert (VToInt(w, pw))                    | Op.VToInt(w, pw) => insert (VToInt(w, pw))
168                      | Op.TensorCopy shp => insert (TensorCopy shp)
169                    | _ => ()                    | _ => ()
170                  (* end case *))                  (* end case *))
171            in            in

Legend:
Removed from v.3954  
changed lines
  Added in v.3955

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