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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3556 - (download) (annotate)
Fri Jan 8 13:49:42 2016 UTC (4 years, 2 months ago) by jhr
File size: 1044 byte(s)
working on merge
(* handle-ein.sml
 *
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.
 *)

structure HandleEin : sig

    val expand : MidIR.var * Ein.ein * MidIR.var list -> MidIR.assignment list

  end = struct
   
    structure E = Ein
    structure SrcIR = HighIR
    structure DstIR = MidIR

    fun useCount (SrcIR.V{useCnt, ...}) = !useCnt

    fun expand (lhs, ein, args) = let
        (* ************** distribute and push Summation*********** *)
          val ein' = EinSums.transform ein
        (* **************** split phase ************* *)
          val newbies5 = FloatEin.transform (lhs, ein', args)
	(* ************** ProbeEIN *********** *)
        (*gives probeEIN the set. Could split into a sepearate step*)
	  val avail = AvailRHS.new()
	  val code = List.map (fn e => ProbeEin.expandEinOp (e, avail)) newbies5
	  val flatcode = List.concat code
	  in
            List.map DstIR.ASSGN flatcode
	  end

  end (* HandleEin *)

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