|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.ssa.SsaGraph
SSA graph
This class defined the object of the SSA graph.
Ths SSA graph has nodes which have the value or operator and labeled by
the variable that defined by the value or operation.
The edge of the node of the SSA graph is from the node that value is used
to the node that value is defined.
Reference:
Bowen Alpern and Mark N. Wegman and F. Kenneth Zadeck,
"Detecting Equality of Variables in Programs,"
Proceedings of the Fifteenth Annual ACM Symposium on Principles of
Programming Language, pp. 1-11, January, 1988.
| Field Summary | |
java.lang.String |
optName
The name of the optimizer which uses SSA graph |
static java.lang.String |
symName
The prefix of the new symbol |
static int |
THR
The threshold of the debug print |
| Constructor Summary | |
SsaGraph(SsaEnvironment e,
SsaSymTab symtab,
java.lang.String opt)
Constructor |
|
| Method Summary | |
(package private) SsaGraphNode |
appendNode(LirNode node,
BasicBlk blk,
int numOfParents)
Append a new node to the SSA graph. |
boolean |
doIt(Data data,
ImList args)
Transform the DATA component. |
boolean |
doIt(Function function,
ImList args)
Make the SSA graph and optimize with the graph. |
java.lang.String |
name()
Return the name of the transforming engine. |
(package private) BiList |
nodeList()
Return the list of the node of the SSA graph. |
(package private) void |
printGraph(java.lang.String filename)
Print the node as graphviz format. |
(package private) void |
setSymbol(Symbol s,
SsaGraphNode node)
Register again the symbol `s' as a value of the node and put it to the map. |
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 |
public static final java.lang.String symName
public final java.lang.String optName
public static final int THR
| Constructor Detail |
public SsaGraph(SsaEnvironment e,
SsaSymTab symtab,
java.lang.String opt)
e - The environment of the SSA modulesymtab - The current symbol table of the SSA moduleopt - The name of the optimizer which uses the SSA graph| Method Detail |
public boolean doIt(Data data,
ImList args)
LocalTransformer
doIt in interface LocalTransformerdata - DATA to be transformed.args - list of optional arguments.
public java.lang.String name()
Transformer
name in interface Transformerpublic java.lang.String subject()
Transformer
subject in interface Transformer
public boolean doIt(Function function,
ImList args)
doIt in interface LocalTransformerfunction - the current functionargs - The list of options
SsaGraphNode appendNode(LirNode node,
BasicBlk blk,
int numOfParents)
node - The LIR node which append into the graphblk - The basic block which the LIR node belongs tonumOfParents - The number of references of the node
BiList nodeList()
void setSymbol(Symbol s,
SsaGraphNode node)
s - The symbol to registernode - The node of the SSA graph which has `s'void printGraph(java.lang.String filename)
filename - The file name for output
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||