coins.opt
Class ConstPropagationAndFolding

java.lang.Object
  extended bycoins.opt.ConstPropagationAndFolding
Direct Known Subclasses:
ConstPropagationAndFoldingHir

public class ConstPropagationAndFolding
extends java.lang.Object

Constant propagation and folding basic logic class. Excluded cases: Use point has multiple definition points Not included in DefIn (may be undefined) Node to which value is to be set Operand of address expression Node having no symbol Vector or structure variable Address taken variable Type of expression differs with the type of constant float/double variable Direct child of SwitchStmt (switch selector) Node generated by previous optimization (before finishHir()) Node already replaced ExpId is not allocated (not an expression)


Field Summary
protected  DataFlow fDataFlow
           
protected  int fDbgLevel
           
 FlowRoot flowRoot
           
(package private)  FlowResults fResults
           
 SubpFlow fSubpFlow
           
protected  UseDefList fUDList
           
(package private) static int JAVA_BYTE_SIZE
           
(package private) static int JAVA_CHAR_SIZE
           
(package private) static int JAVA_INT_SIZE
           
(package private) static int JAVA_LONG_SIZE
           
(package private) static int JAVA_SHORT_SIZE
           
 Opt opt
           
 Sym sym
           
 SymRoot symRoot
           
 
Constructor Summary
ConstPropagationAndFolding(FlowResults pResults)
          ConstPropagationAndFolding
 
Method Summary
protected  boolean doBBlock(BBlock pBBlock, java.util.Set pReplacedNodes)
          doBBlock
 boolean doSubp(SubpFlow pSubpFlow)
          doSubp
(package private)  HIR SkipConv(HIR exp)
          ex) expression :p = (int) a; exp := (int) [node] return ; a [node] ;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAVA_BYTE_SIZE

static final int JAVA_BYTE_SIZE
See Also:
Constant Field Values

JAVA_CHAR_SIZE

static final int JAVA_CHAR_SIZE
See Also:
Constant Field Values

JAVA_SHORT_SIZE

static final int JAVA_SHORT_SIZE
See Also:
Constant Field Values

JAVA_INT_SIZE

static final int JAVA_INT_SIZE
See Also:
Constant Field Values

JAVA_LONG_SIZE

static final int JAVA_LONG_SIZE
See Also:
Constant Field Values

flowRoot

public final FlowRoot flowRoot

symRoot

public final SymRoot symRoot

sym

public final Sym sym

fResults

FlowResults fResults

opt

public final Opt opt

fSubpFlow

public final SubpFlow fSubpFlow

fUDList

protected UseDefList fUDList

fDataFlow

protected DataFlow fDataFlow

fDbgLevel

protected final int fDbgLevel
Constructor Detail

ConstPropagationAndFolding

public ConstPropagationAndFolding(FlowResults pResults)
ConstPropagationAndFolding

Method Detail

SkipConv

HIR SkipConv(HIR exp)
ex) expression :p = (int) a; exp := (int) [node] return ; a [node] ;


doSubp

public boolean doSubp(SubpFlow pSubpFlow)
doSubp


doBBlock

protected boolean doBBlock(BBlock pBBlock,
                           java.util.Set pReplacedNodes)
doBBlock