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

SCM Repository

[diderot] Annotation of /branches/vis15/src/compiler/high-to-mid/handle-ein.sml
ViewVC logotype

Annotation of /branches/vis15/src/compiler/high-to-mid/handle-ein.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3582 - (view) (download)

1 : jhr 3550 (* handle-ein.sml
2 :     *
3 :     * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     *
5 :     * COPYRIGHT (c) 2016 The University of Chicago
6 :     * All rights reserved.
7 :     *)
8 :    
9 :     structure HandleEin : sig
10 :    
11 :     val expand : MidIR.var * Ein.ein * MidIR.var list -> MidIR.assignment list
12 :    
13 :     end = struct
14 :    
15 :     structure E = Ein
16 :     structure SrcIR = HighIR
17 :     structure DstIR = MidIR
18 :    
19 :     fun useCount (SrcIR.V{useCnt, ...}) = !useCnt
20 :    
21 : jhr 3552 fun expand (lhs, ein, args) = let
22 : jhr 3550 (* ************** distribute and push Summation*********** *)
23 : jhr 3552 val ein' = EinSums.transform ein
24 : jhr 3550 (* **************** split phase ************* *)
25 : jhr 3556 val newbies5 = FloatEin.transform (lhs, ein', args)
26 : jhr 3550 (* ************** ProbeEIN *********** *)
27 : jhr 3582 (* gives probeEIN the set. Could split into a sepearate step *)
28 :     val code = List.map (fn e => ProbeEin.expand e) newbies5
29 : jhr 3550 val flatcode = List.concat code
30 :     in
31 :     List.map DstIR.ASSGN flatcode
32 :     end
33 :    
34 :     end (* HandleEin *)

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