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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml

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

revision 3746, Tue Apr 12 11:49:43 2016 UTC revision 3754, Thu Apr 14 22:45:39 2016 UTC
# Line 29  Line 29 
29      val reduce : AvailRHS.t * (AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var) * LowIR.var list      val reduce : AvailRHS.t * (AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var) * LowIR.var list
30            -> LowIR.var            -> LowIR.var
31    
32      (* integer arithmetic *)
33        val intAdd : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var
34    
35    (* scalar arithmetic *)    (* scalar arithmetic *)
36      val realAdd : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var      val realAdd : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var
37      val realSub : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var      val realSub : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var
# Line 107  Line 110 
110              gen (arg, args)              gen (arg, args)
111            end            end
112    
113      (* integer arithmetic *)
114        local
115          fun scalarOp2 rator (avail, x, y) = add (avail, "i", Ty.IntTy, IR.OP(rator, [x, y]))
116        in
117        val intAdd = scalarOp2 Op.IAdd
118        end
119    
120    (* scalar arithmetic *)    (* scalar arithmetic *)
121      local      local
122        fun scalarOp1 rator (avail, x) = add (avail, "r", Ty.realTy, IR.OP(rator, [x]))        fun scalarOp1 rator (avail, x) = add (avail, "r", Ty.realTy, IR.OP(rator, [x]))
# Line 138  Line 148 
148      val vecScale = vecOp2 Op.VScale      val vecScale = vecOp2 Op.VScale
149      val vecMul = vecOp2 Op.VMul      val vecMul = vecOp2 Op.VMul
150      val vecNeg = vecOp1 Op.VNeg      val vecNeg = vecOp1 Op.VNeg
151      val vecSum = vecOp1 Op.VSum      fun vecSum (avail, dim, v) = add (avail, "vsm", Ty.realTy, IR.OP(Op.VSum dim, [v]))
152      fun vecProj (avail, dim, x, i) =      fun vecProj (avail, dim, x, i) =
153            add (avail, "v", Ty.TensorTy[dim], IR.OP(Op.VProj(dim, i), [x]))            add (avail, "v", Ty.TensorTy[dim], IR.OP(Op.VProj(dim, i), [x]))
154      end (* local *)      end (* local *)

Legend:
Removed from v.3746  
changed lines
  Added in v.3754

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