coins.ssa
Class TranslateToSsa

java.lang.Object
  extended bycoins.ssa.TranslateToSsa
All Implemented Interfaces:
LocalTransformer, Transformer

public class TranslateToSsa
extends java.lang.Object
implements LocalTransformer

Translate to the static single assignment form ( SSA form ). There are 3 major forms in SSA form :
1. minimal SSA
2. semi-pruned SSA
3. pruned SSA
The difference among these form is the number of PHI instructions. This class can translate to these 3 forms. This class also fold copy expressions during rename phase.


Field Summary
static int MINIMAL
          The minimal SSA form
static int PRUNED
          The pruned SSA form
static int SEMI_PRUNED
          The semi-pruned SSA form
static int THR
          The threshold of the debug print
static int THR2
          The threshold of the debug print
 
Constructor Summary
(package private) TranslateToSsa(SsaEnvironment e, SsaSymTab stab, int howToTranslate, boolean withCopyFolding)
          Constructor
 
Method Summary
 boolean doIt(Data data, ImList args)
          Transform the DATA component.
 boolean doIt(Function function, ImList args)
          Translate to the SSA form.
 java.lang.String name()
          Return the name of the transforming engine.
 java.lang.String subject()
          Return brief description of the tranformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMAL

public static final int MINIMAL
The minimal SSA form

See Also:
Constant Field Values

SEMI_PRUNED

public static final int SEMI_PRUNED
The semi-pruned SSA form

See Also:
Constant Field Values

PRUNED

public static final int PRUNED
The pruned SSA form

See Also:
Constant Field Values

THR

public static final int THR
The threshold of the debug print

See Also:
Constant Field Values

THR2

public static final int THR2
The threshold of the debug print

See Also:
Constant Field Values
Constructor Detail

TranslateToSsa

TranslateToSsa(SsaEnvironment e,
               SsaSymTab stab,
               int howToTranslate,
               boolean withCopyFolding)
Constructor

Parameters:
e - The environment of the SSA form
stab - The current symbol table on SSA form
howToTranslate - Specify the translate method
withCopyFolding - Whether copy fold or not
Method Detail

doIt

public boolean doIt(Data data,
                    ImList args)
Description copied from interface: LocalTransformer
Transform the DATA component.

Specified by:
doIt in interface LocalTransformer
Parameters:
data - DATA to be transformed.
args - list of optional arguments.
Returns:
true if transformation suceeded.

name

public java.lang.String name()
Description copied from interface: Transformer
Return the name of the transforming engine. Used for trace tag name.

Specified by:
name in interface Transformer
Returns:
the name of the transforming engine.

subject

public java.lang.String subject()
Description copied from interface: Transformer
Return brief description of the tranformation.

Specified by:
subject in interface Transformer
Returns:
brief description of the tranformation.

doIt

public boolean doIt(Function function,
                    ImList args)
Translate to the SSA form.

Specified by:
doIt in interface LocalTransformer
Parameters:
function - The current function
args - The list of options
Returns:
true if transformation suceeded.