coins.ssa
クラス SsaGraph

java.lang.Object
  |
  +--coins.ssa.SsaGraph
すべての実装インタフェース:
LocalTransformer, Transformer

class SsaGraph
extends java.lang.Object
implements LocalTransformer

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.


フィールドの概要
 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
 
コンストラクタの概要
SsaGraph(SsaEnvironment e, SsaSymTab symtab, java.lang.String opt)
          Constructor
 
メソッドの概要
(パッケージプライベート)  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.
(パッケージプライベート)  BiList nodeList()
          Return the list of the node of the SSA graph.
(パッケージプライベート)  void printGraph(java.lang.String filename)
          Print the node as graphviz format.
(パッケージプライベート)  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.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

symName

public static final java.lang.String symName
The prefix of the new symbol

関連項目:
定数フィールド値

optName

public final java.lang.String optName
The name of the optimizer which uses SSA graph


THR

public static final int THR
The threshold of the debug print

関連項目:
定数フィールド値
コンストラクタの詳細

SsaGraph

public SsaGraph(SsaEnvironment e,
                SsaSymTab symtab,
                java.lang.String opt)
Constructor

パラメータ:
e - The environment of the SSA module
symtab - The current symbol table of the SSA module
opt - The name of the optimizer which uses the SSA graph
メソッドの詳細

doIt

public boolean doIt(Data data,
                    ImList args)
インタフェース LocalTransformer の記述:
Transform the DATA component.

定義:
インタフェース LocalTransformer 内の doIt
パラメータ:
data - DATA to be transformed.
args - list of optional arguments.
戻り値:
true if transformation suceeded.

name

public java.lang.String name()
インタフェース Transformer の記述:
Return the name of the transforming engine. Used for trace tag name.

定義:
インタフェース Transformer 内の name
戻り値:
the name of the transforming engine.

subject

public java.lang.String subject()
インタフェース Transformer の記述:
Return brief description of the tranformation.

定義:
インタフェース Transformer 内の subject
戻り値:
brief description of the tranformation.

doIt

public boolean doIt(Function function,
                    ImList args)
Make the SSA graph and optimize with the graph.

定義:
インタフェース LocalTransformer 内の doIt
パラメータ:
function - the current function
args - The list of options
戻り値:
true if transformation suceeded.

appendNode

SsaGraphNode appendNode(LirNode node,
                        BasicBlk blk,
                        int numOfParents)
Append a new node to the SSA graph.

パラメータ:
node - The LIR node which append into the graph
blk - The basic block which the LIR node belongs to
numOfParents - The number of references of the node
戻り値:
A new node of the SSA graph

nodeList

BiList nodeList()
Return the list of the node of the SSA graph.

戻り値:
The list of the node of the SSA graph

setSymbol

void setSymbol(Symbol s,
               SsaGraphNode node)
Register again the symbol `s' as a value of the node and put it to the map. If the map already has `s', then remove the old one and register again.

パラメータ:
s - The symbol to register
node - The node of the SSA graph which has `s'

printGraph

void printGraph(java.lang.String filename)
Print the node as graphviz format.

パラメータ:
filename - The file name for output