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

SCM Repository

[diderot] View of /branches/vis12/src/compiler/README
ViewVC logotype

View of /branches/vis12/src/compiler/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1685 - (download) (annotate)
Sun Jan 22 15:23:36 2012 UTC (7 years, 8 months ago) by jhr
File size: 4170 byte(s)
  Create a branch to implement things that we need for the Vis 2012 paper
This directory contains the sources of Diderot compiler.  The compiler is
organized into a series of passes, each of which takes a Diderot program
in some representation and produces a new representation.  Here is a summary
of the passes:

    1) Scanning and parsing
	This phase scans and parses the Diderot source program.
	(see parser)

    2) Typechecking
	This phase takes the parse tree and typechecks it, producing a typed
	AST representation.
	(see ast, basis, parser, typechecker)

    3) Simplification
	This takes the Typed AST representation and produces the Simple AST
	representation.  Simple AST only allows simple expressions over
	variables.  This phase is also responsible for loading the image
	summary information.  To do so, we determine which input variables are
	required to load the images, get the values from the user, and then
	evaluate the static code (including using dnorm to get image info).
	(see ast, simplify)

    4) Translation to HighIL
	This pass takes the Simple AST representation and translates it to
	HighIL representation, which is a block-structured SSA representation.
	(see basis, high-il, IL, simplify, translation)

    5) HighIL optimization
	The HighIL optimization phase is mostly a normalization phase that
	lifts static computations to the global level and eliminates
	dynamic field, kernel, and image values (i.e., statically resolves
	them).
	(see high-il, IL)

    6) Translation to MidIL
	This pass translates the HighIL representation to MidIL.  The main
	purpose of this step is to replace fields with convolved images.
	The MidIL includes operations to transform world-space positions
	to image-space, to load voxels from images, and to evaluate kernels.
	The MidIL representation supports vector operations, but tensors
	with order > 1 are flattened.
	(see high-il, high-to-mid, IL, mid-il)

    7) MidIL optimization
	*** Not implemented yet ***
	(see mid-il, IL)

    8) Translation to LowIL
	This pass translates the MidIL representation to LowIL.  It expands
	kernel evaluations into their piecewise polynomial equivalents and
	it expands out the address calculations for voxel addresses.
	(see IL, low-il, mid-il, mid-to-low)

    9) LowIL optimization
	*** Not implemented yet ***
	(see IL, low-il)

   10) Translation to TreeIL
	The first part of code generation is to turn SSA assignments into
	expression trees and to turn the CFG into block structured code.
	This is accomplished by the translation from LowIL to TreeIL, which
	uses the same operators and types as LowIL.  This phase also includes
	a transformation of the LowIL to properly handle variable scoping.
	(see IL, low-il, tree-il)

   11) TreeIL optimization
	*** Not implemented yet ***
	This pass will cleanup some of the artifacts from the SSA form by
	coalescing variables.
	(see tree-il)

   12) Code generation
	After translation to TreeIL, we generate code using the abstract TARGET
	interface.
	(see c-target, codegen, tree-il)

And here is a roadmap of the subdirectories:

    IL			- The generic IL modules that are used for the HighIL,
			  MidIL, and LowIL representations.
    IL/gen		- A simple program generator for the IL modules.
    ast			- The typed AST representation
    basis		- The definition of the Diderot Basis environment
    c-target		- Backend support for generating C code.
    codegen		- Generic code-generation infrastructure, including the
			  TreeIL representation
    common		- Various miscellaneous utility modules
    driver		- The driver glues the various phases together
    env			- The environment representation used in typechecking
    fields		- Internal representations of image info, kernels, and
			  fields
    high-il		- The HighIL representation
    high-to-mid		- The HighIL to MidIL translation phase
    low-il		- The LowIL representation
    mid-il		- The MidIL representation
    mid-to-low		- The MidIL to LowIL translation phase
    parser		- The parser, scanner, and parse-tree representation.
    simplify		- Contains the Simple AST representation and the
			  simplification phase.
    translate		- The translation from Simple AST to High IL
    typechecker		- The typechecker


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