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

SCM Repository

[diderot] View of /branches/vis15/src/compiler/tree-to-c/tree-to-c.sml
ViewVC logotype

View of /branches/vis15/src/compiler/tree-to-c/tree-to-c.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3866 - (download) (annotate)
Mon May 16 16:48:13 2016 UTC (3 years, 2 months ago) by jhr
File size: 1234 byte(s)
working on merge
(* tree-to-c.sml
 *
 * Code generation for the sequential and parallel targets.
 *
 * 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 TreeToC : sig

    val target : TargetOptions.t -> {
	    info : TreeIR.target_info,
	    generate : TreeIR.program -> unit
	  }

  end = struct

    structure IR = TreeIR
    structure CL = CLang
    structure Spec = TargetSpec

    fun generate (tgt : TargetOptions.t) prog = let
	  val IR.Program{
		  props, target, consts, inputs, constInit,
		  globals, globalInit, strand, create, update
		} = prog
	  val spec = TargetSpec.mk (tgt, props)
	  in
	    if (* standalone exec *)
	      then
	      else
	  end

    fun info (tgt : TargetOptions.t) = {
	    layout = if (#scalar tgt)
		then DefaultLayout.scalar
		else DefaultLayout.layout (DefaultLayout.gccVectorSizes (#double tgt)),
	    isInline =
	       fn LowOps.EigenVecs2x2 => false
		| LowOps.EigenVecs3x3 => false
		| LowOps.EigenVals2x2 => false
		| LowOps.EigenVals3x3 => false
		| LowOps.Zero => false
		| _ => true
	  }

    fun target tgt = {
	    info = info tgt,
	    generate = generate tgt
	  }

  end

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