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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/tree-il/tree-to-opr.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/tree-il/tree-to-opr.sml

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

revision 2748, Wed Oct 1 21:16:56 2014 UTC revision 2749, Wed Oct 1 23:11:09 2014 UTC
# Line 37  Line 37 
37          | IL.E_Lit _                    => set1          | IL.E_Lit _                    => set1
38          | IL.E_Mux _                    => set1          | IL.E_Mux _                    => set1
39          | IL.E_Apply (_, exps)          => addToSet(v,set1,default,exps)          | IL.E_Apply (_, exps)          => addToSet(v,set1,default,exps)
40          | IL.E_Cons (ty as Ty.TensorTy[n], exps)         => addToSet(v,set1,([ty], [Fnc.CONSV n]),exps)          | IL.E_Cons (ty as Ty.TensorTy[n], _,exps)         => addToSet(v,set1,([ty], [Fnc.CONSV n]),exps)
41          | IL.E_Cons (ty, exps)         => addToSet(v,set1,([ty], []),exps)          | IL.E_Cons (ty as Ty.TensorTy[n,m], _,exps)         => addToSet(v,set1,([ty], [Fnc.CONSV n]),exps)
42            | IL.E_Cons (ty, _,exps)         => addToSet(v,set1,([ty], []),exps)
43    
44          | IL.E_LoadArr(A,fTy,oTy,exp,_) => let          | IL.E_LoadArr(A,fTy,oTy,exp,_) => let
45                  (*addToSet(v,set1,([vecTy fTy],[Fnc.LDArr(A,fTy,oTy,true)]),[exp])*)                  (*addToSet(v,set1,([vecTy fTy],[Fnc.LDArr(A,fTy,oTy,true)]),[exp])*)
# Line 62  Line 63 
63          end          end
64      and stmtToOpr(set1,stmt)=(case stmt      and stmtToOpr(set1,stmt)=(case stmt
65          of IL.S_Input (_,_,_, NONE)     => set1          of IL.S_Input (_,_,_, NONE)     => set1
66          |  IL.S_Assign ([x],IL.E_Cons(ty as Ty.TensorTy[n], exp))=> addToSet([x],set1, ([ty],[Fnc.CONSV n]),exp)          |  IL.S_Assign ([x],IL.E_Cons(ty as Ty.TensorTy[n], _,exp))=> addToSet([x],set1, ([ty],[Fnc.CONSV n]),exp)
67          |  IL.S_Assign (v,exp)          => expToOpr(v,set1,exp)          |  IL.S_Assign (v,exp)          => expToOpr(v,set1,exp)
68          | IL.S_IfThen(exp,_)            => expToOpr([],set1,exp)          | IL.S_IfThen(exp,_)            => expToOpr([],set1,exp)
69          | IL.S_IfThenElse( exp,_,_)     => expToOpr([],set1,exp)          | IL.S_IfThenElse( exp,_,_)     => expToOpr([],set1,exp)
# Line 77  Line 78 
78              in              in
79                  addToSet([],set1, (typ,fnc),exps)                  addToSet([],set1, (typ,fnc),exps)
80              end              end
81          | IL.S_Cons(x,origTy,ty, exp)=>addToSet([x],set1,([],[Fnc.CONS(ty)]),exp) (*calls array function*)          | IL.S_Cons(x,origTy,ty, exp)=>addToSet([x],set1,([],[Fnc.CONS origTy]),exp) (*calls array function*)
82          | _                             => set1          | _                             => set1
83      (*end case*))      (*end case*))
84  (*  (*

Legend:
Removed from v.2748  
changed lines
  Added in v.2749

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