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

SCM Repository

[diderot] View of /trunk/src/compiler/README
ViewVC logotype

View of /trunk/src/compiler/README

Parent Directory Parent Directory | Revision Log Revision Log

Revision 430 - (download) (annotate)
Mon Oct 18 22:26:52 2010 UTC (11 years, 8 months ago) by jhr
File size: 3322 byte(s)
  update descriptions of passes
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 determining which
	global variables are static and evaluating them to.  The main purpose
	of the static evaluation is to get the image summary information from
	(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
	(see high-il, high-il-opt, 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, mid-il-opt, IL)

    6) Translation to LowIL
	*** Not implemented yet ***
	(see IL, low-il, mid-il, mid-to-low)

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

    8) Code generation
	*** Not implemented yet ***
	(see IL, low-il, c-target, codegen)

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
    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
    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

ViewVC Help
Powered by ViewVC 1.0.0