|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
ArrayDestroyer | This class breaks up arrays into local vars as much as possible |
ArrayInitExpander | This class expands array initializers that read from files into static constants. |
BlockFlattener | This class flattens nested blocks in methods. |
BranchAnalyzer | This class aggressively analyzes branches in control flow for information gained and calls constant prop on the rest of the method with the new information gained. |
CollapseDataParallelism | OVERVIEW ---------------------------------------------------- The goal of this class is to identify big splitjoins of data-parallel components that can be collapsed to a single filter, WITHOUT duplicating any code. |
ConstantProp | This class propagates constants and unrolls loops. |
ConstructSIRTree | This class inputs a stream representation where child/parent relationships and initialization arguments are given via SIRInitStatements. |
DataFlow | Basic dataflow framework. |
DeadCodeElimination | Removes what dead code we can detect within a filter. |
EnqueueToInitPath | Create initPath() functions for feedback loops that don't have them. |
FieldInitMover | This class converts joint field definition/assignment statements to a field decl and a corresponding field assignment statement in the init function. |
FieldProp | This class propagates constant assignments to field variables from the init function into other functions. |
FinalUnitOptimize | Final agressive filter optimization before code emission. |
FindTapeOps | |
Flattener | This is the main class for decomposing the high SIR into lower-level function calls for the uniprocessor backend. |
InlinePhases | This class inlines each phase (i.e., a helper function that does I/O) of a filter into the call site of that phase. |
IntroduceMultiPops | Introduce multi-pops. |
JVectorLiteral | Vector literals: a literal of a numeric base type duplicated to fill a vector. |
LoopIterInfo | Information about loops with fixed number of iterations. |
LoweringConstants | Contains various constants for the lowering process. |
LowerInitFunctions | This class adds LIR hooks to the init functions. |
LowerWorkFunctions | This class adds LIR hooks to work functions. |
MarkFilterBoundaries | Inserts an SIRMarker at the beginning and end of every filter's work function. |
PopToPeek | This class converts all pops in a program into peeks. |
Propagator | This class propagates constants and partially evaluates all expressions as much as possible. |
RemoveDynamicRates | NOTE: This class is deprecated in favor of SIRDynamicRateManager. |
RemoveMultiPops | Remove multi-pops. |
RenameAll | This visitor renames every variable, method, and field to a globally unique name. |
RenameDestroyedVars | |
RoundToFloor | This class converts calls "round(x)" to "floor(x+0.5)". |
SimplifyArguments | Re-write code so function arguments are either literal, local, field, or array access. |
SimplifyPopPeekPush | Re-write code so push, pop, and peek are separate statements, and arguments to them are either literal, local, field, or array access. |
SIRSchedule | This provides an SIR wrapper for the underlying schedule (from the scheduler package). |
SIRScheduler | This builds a schedule for the stream and instantiates the schedule in a series of calls to filter's work functions. |
StaticsProp | StaticsProp propagates constants from 'static' sections. |
StaticsProp.IterOverAllFieldsAndMethods | Methods to iterate a EmptyAttributeVisitor over all fields / methods / parameters of a stream, or of a subgraph of the stream graph. |
StructDestroyer | This class breaks up structures as much as possible. |
Structurer | This creates structures (inner classes) to encapsulate the state of each hierarchical unit of a stream graph. |
ThreeAddressCode | Turn statements into three-address code optionally depending on overridable simpleExpression and shouldConvertExpression methods. |
ThreeAddressExpressionCheck | A Expression visitor, walking the structure and allowing overridable pre- or post-visits to the nodes. |
Unroller | This class unrolls loops where it can. |
VarDeclRaiser | This class raises Variable Declaration to the beginning of blocks for C friendly code Use visitBlockStatement to move Var Decls to top of block or have it run on the method and have it recurse |
Vectorizable | Determine if code is naively vectorizable by interleaving executions of different steady states. |
Vectorize | Transform methods for a filter to use vector types as appropriate. |
VectorizeEnable | Mung code to allow naive vectorization. |
Provides compiler passes that analyze or optimize the SIR, primarily within the code of each filter.
Also contains Flattener
, the entry
point for the original (and mostly obsolete) uniprocessor backend.
Other files in this directory that are used solely by this backend
include Structurer
, LowerInitFunctions
, and LowerWorkFunctions
. They can be ignored for
the sake of most compiler development.
This package also provides the primary interface from the compiler
to the scheduler (in SIRScheduler
).
While some other parts of the compiler call the scheduler as well (for
example, to calculate messaging constraints), this class provides the
fundamental operation of calculating execution multiplicities for a
set of filters.
The remaining files in this package perform various node-level transformations on the IR. They can be broadly categorized into passes that are often necessary for correctness, vs. passes that affect only performance or readability.
Passes that are needed (at least in part) due to correctness:
ArrayInitExpander
Support reading initial values for arrays from files at compile time.
ConstantProp
Constant Propagation and algebraic simplification.
ConstructSIRTree
Removes SITInitStatement, creating SIR tree representation.
EnqueueToInitPath
Sets up "initPath" functions to translate the enqueue statements in FeedbackLoops.
FieldInitMover
Moves field initialization from field declaration into the beginning of init().
FieldProp
Sometimes called from ConstantProp, but also separately. Why?
InlinePhases
Propagator
Lower level of ConstantProp, also performs some algebraic and boolean simplification. Normally called from ConstantProp.
RemoveMultiPops
changes pop(N) into N pop() instructions for back ends that do not generate code for pop(N).
RenameAll
Makes all variable names unique. Prerequisite for most other passes.
RoundToFloor
Converts round(x) to floor(x+0.5) so that C and Java code produce the same results.
StaticsProp
Propagates values of fields defined in static{...} into filters that use them.
Unroller
Sometimes called from ConstantProp to find more constants by unrolling loops. Sometimes called separately.
VarDeclRaiser
ConstantProp
, FieldProp
and Unroller
to statically evaluate the contents
of the init function. The ConstructSIRTree
pass verifies that this
process is complete and cements the graph structure. Note that Unroller
is also used to further optimize the
work function if unrolling is enabled.
In contrast, passes that are used strictly for performance or readability include:
ArrayDestroyer
Convert arrays that are only referenced at constant offsets into individual variables.
BranchAnalyzer
CollapseDataParallelism
Collapse split-joins with user-specified data parallelism if the result can be re-expanded with StatelessDuplicate
. May result in substantially smaller graph during compilation.
DeadCodeElimination
(Beware! hashes on Kopi constructs that generally have identity-based hashes. Make sure you share all JVariableDefinition's.)
FindTapeOps
Utility to determine if a compilation uint references an input or output tape.
IntroduceMultiPops
Combines adjacent pop() and pop(N) instructions.
MarkFilterBoundaries
Inserts special marker instructions allowing a filter's code to be found after fusion.
PopToPeek
Convert pop() to peek(index++). Must be followed with call to ConstantProp.
RenameDestroyedVars
Adjust live ranges. Used after ArrayDestroyer (and StructDestroyer?).
SimplifyArguments
Use ThreeAddressCode to ensure that function arguments have no side effects. Useful for implementing functions as macros.
SimplifyPopPeekPush
Use ThreeAddressCode to ensure that all pushes, pops, peeks occur as separate statements. Required for VectorizeEnable
. Since works in left-to-right manner, has some semantic effect in ordering multiple pops within a single expression.
StructDestroyer
Convert structures into individual variables as much as possible.
ThreeAddressCode
Convert specified constructs to three-address code.
VectorizeEnable
Run sequences of 4 steady states at once using vector registers for (fused) filters that are Vectorizable
The at.dms.kjc.sir.lowering.FilterPhaser
and DataFlow
classes do not appear in either of
the previous lists because they are not currently utilized by the
compiler.
RemoveDynamicRates
was an unsafe transormation converting all dynamic rates to rate 1. It is superceded by use of SIRDynamicRateManager
.
Some classes in this package are usually invoked from other passes.
Propagator
which performs constant propagation, copy propagation, and algebraic and boolean simplification is called from ConstantProp
FieldProp
and Unroller
are called as needed from ConstantProp
for propagating parameters through the stream graph.
Some classes in this package are only used by the obsolete C library (uni) backend. These include:
Flattener
Structurer
SIRSchedule
SIRScheduler
LowerInitFunctions
LowerWorkFunctions
LoweringConstants
contains some constants unly used by the obsolete C library (uni) backend, and some constants used by other backends.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |