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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/c-target/opr-to-clang.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/c-target/opr-to-clang.sml

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

revision 2680, Wed Aug 6 00:51:53 2014 UTC revision 2681, Sun Aug 24 18:59:07 2014 UTC
# Line 304  Line 304 
304    
305    
306      (*General Load*)      (*General Load*)
307      fun generalldVec(A,tyNew,tyOrig) =let      fun generalldVec(A,tyNew,tyOrig,isArr) =let
308          val VarA= CL.E_Var varA          val VarA= CL.E_Var varA
309          val VarI=CL.E_Var varI          val VarI=CL.E_Var varI
310          val rtnType= vecTy tyNew          val rtnType= vecTy tyNew
311          val fnName=N.NameLdVec(A,tyNew,tyOrig)          val fnName=N.NameLd(A,tyNew,tyOrig,isArr)
312          val stmts=(case A          val stmts=(case A
313              of false =>ldVec(tyNew,tyOrig,rtnType,VarA,VarI)              of false =>ldVec(tyNew,tyOrig,rtnType,VarA,VarI)
314              | true =>              | true =>
# Line 347  Line 347 
347    
348    
349   (*General store function *)   (*General store function *)
350   fun generalmkVec(aligned,tyN,tyOrig)= let   fun generalmkVec(aligned,tyN,tyOrig,isArr)= let
351      val rtnType=voidTy      val rtnType=voidTy
352      val fnName=N.NameMkVec(aligned,tyN,tyOrig)      val fnName=N.NameMkVec(aligned,tyN,tyOrig,isArr)
353      val VarA= CL.E_Var varA      val VarA= CL.E_Var varA
354      val VarI=CL.E_Var varI      val VarI=CL.E_Var varI
355      val VarV= CL.E_Var varV      val VarV= CL.E_Var varV
# Line 368  Line 368 
368    
369    
370      (* handleOPr: transform Tree-IL Opr to CLang Declarations*)      (* handleOPr: transform Tree-IL Opr to CLang Declarations*)
371      fun handleOpr( ILF.LDArr (b,tyNew,tyOrig))= generalldVec(b,tyNew,tyOrig)      fun handleOpr( ILF.LDArr (A,tyR,tyO))= generalldVec(A,tyR,tyO,true)
372        | handleOpr( ILF.LDVec (b,tyNew,tyOrig))= generalldVec(b,tyNew,tyOrig)        | handleOpr( ILF.STORE (A,tyR,tyO,isArr))=generalmkVec(A,tyR,tyO,isArr)
373        | handleOpr( ILF.MKVEC (A,tyR,tyO))=generalmkVec(A,tyR,tyO)  
374        | handleOpr( ILF.CONSV n)= mkRealToVec n        | handleOpr( ILF.CONSV n)= mkRealToVec n
375        | handleOpr( ILF.CONS(Ty.TensorTy ty))=ConsTensorToArray  ty        | handleOpr( ILF.CONS(Ty.TensorTy ty))=ConsTensorToArray  ty
   
376        | handleOpr( ILF.CONS _)=  default        | handleOpr( ILF.CONS _)=  default
377    
378        | handleOpr( ILF.OP(Op.prodScaV d))=mkScaV d        | handleOpr( ILF.OP(Op.prodScaV d))=mkScaV d

Legend:
Removed from v.2680  
changed lines
  Added in v.2681

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