SCM Repository
View of /branches/pure-cfg/src/compiler/README
Parent Directory
|
Revision Log
Revision 578 -
(download)
(annotate)
Sun Mar 6 19:53:19 2011 UTC (10 years, 1 month ago) by jhr
File size: 4104 byte(s)
Sun Mar 6 19:53:19 2011 UTC (10 years, 1 month ago) by jhr
File size: 4104 byte(s)
Added documentation
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 teh 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, 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 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) 7) LowIL optimization *** Not implemented yet *** (see IL, low-il, low-il-opt) 8) 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. (see IL, low-il, codegen) 9) TreeIL optimization *** Not implemented yet *** This pass will cleanup some of the artifacts from the SSA form by coalescing variables. (see codegen) 8) Code generation After translation to TreeIL, we generate code using the abstract TARGET interface. (see 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, 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 |