coins.casttohir
クラス ToHirCOpt2

java.lang.Object
  |
  +--coins.casttohir.ToHirVisit
        |
        +--coins.casttohir.ToHirCOpt
              |
              +--coins.casttohir.ToHirCOpt2

public class ToHirCOpt2
extends ToHirCOpt

Do HIR-C optimization for arithmetic expression and conditional expression. Optimization level is controlled by compile option. ToHirCOpt2 does kind 4 through kind 8 optimizations described in ToHirCOpt.


フィールドの概要
protected  SideEffectCutter cutter
           
protected  ToHirCOpt2 toOpt
           
 
クラス coins.casttohir.ToHirCOpt から継承したフィールド
buffer, fDbgLevel, hir, inverter, nowBlock, sym, toCast, toHir
 
コンストラクタの概要
ToHirCOpt2(ToHir tohir)
          Constructor.
 
メソッドの概要
protected  Exp atAdd(Exp e)
          At add expression node.
protected  Exp atAnd(Exp e)
          At and expression node.
protected  Exp atARShift(Exp e)
          At arithmetic R-shift expression node.
protected  Exp atCmpEq(Exp e)
          At EQ expression node.
protected  Exp atCmpGe(Exp e)
          At GE expression node.
protected  Exp atCmpGt(Exp e)
          At GT expression node.
protected  Exp atCmpLe(Exp e)
          At LE expression node.
protected  Exp atCmpLt(Exp e)
          At LT expression node.
protected  Exp atCmpNe(Exp e)
          At NE expression node.
protected  Exp atDiv(Exp e)
          At mul expression node.
protected  Exp atLgAnd(Exp e)
          At logical-and expression node.
protected  Exp atLgOr(Exp e)
          At logical-or expression node.
protected  Exp atLShift(Exp e)
          At L-shift expression node.
protected  Exp atMod(Exp e)
          At mod expression node.
protected  Exp atMul(Exp e)
          At mul expression node.
protected  Exp atOffset(Exp e)
          At offset(difference of address) expression node.
protected  Exp atOr(Exp e)
          At and expression node.
protected  Exp atRShift(Exp e)
          At logical R-shift expression node.
protected  Exp atSelect(Exp e)
          At selection expression node.
protected  Exp atSub(Exp e)
          At sub expression node.
protected  Exp atXor(Exp e)
          At xor expression node.
protected  void message(int level, java.lang.String mes)
          Output debug message.
protected  ToHirCOpt2 sureChild()
          Make sure child of this object.
 
クラス coins.casttohir.ToHirCOpt から継承したメソッド
atAddAssign, atAddr, atAndAssign, atArrow, atAssign, atAssignStmt, atBlock, atCall, atComma, atConst, atContents, atConv, atDecay, atDivAssign, atElem, atEqZero, atExpList, atExpRepeat, atExpStmt, atFor, atIf, atIndex, atInfStmt, atJump, atLabeledStmt, atLShiftAssign, atModAssign, atMulAssign, atNeg, atNot, atOrAssign, atPost, atPre, atQual, atReturn, atRShiftAssign, atSetDataStmt, atSubAssign, atSubp, atSubpDefinition, atSubs, atSwitch, atUndecay, atUntil, atVar, atWhile, atXorAssign, inInitBlock, processPragmaItem, visitExp, visitProgram, visitProgram, visitStmt
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

toOpt

protected ToHirCOpt2 toOpt

cutter

protected final SideEffectCutter cutter
コンストラクタの詳細

ToHirCOpt2

public ToHirCOpt2(ToHir tohir)
Constructor.

パラメータ:
tohir - Offers cooperation with the object of other packages.
メソッドの詳細

sureChild

protected ToHirCOpt2 sureChild()
Make sure child of this object.

戻り値:
Child of this object.

message

protected void message(int level,
                       java.lang.String mes)
Output debug message.

オーバーライド:
クラス ToHirCOpt 内の message
パラメータ:
level - Debug level.
mes - Debug message.

atAdd

protected Exp atAdd(Exp e)
At add expression node.

オーバーライド:
クラス ToHirVisit 内の atAdd
パラメータ:
e - Exp
戻り値:
Exp

atSub

protected Exp atSub(Exp e)
At sub expression node.

オーバーライド:
クラス ToHirVisit 内の atSub
パラメータ:
e - Exp
戻り値:
Exp

atMul

protected Exp atMul(Exp e)
At mul expression node.

オーバーライド:
クラス ToHirVisit 内の atMul
パラメータ:
e - Exp
戻り値:
Exp

atDiv

protected Exp atDiv(Exp e)
At mul expression node.

オーバーライド:
クラス ToHirVisit 内の atDiv
パラメータ:
e - Exp
戻り値:
Exp

atMod

protected Exp atMod(Exp e)
At mod expression node.

オーバーライド:
クラス ToHirVisit 内の atMod
パラメータ:
e - Exp
戻り値:
Exp

atAnd

protected Exp atAnd(Exp e)
At and expression node.

オーバーライド:
クラス ToHirVisit 内の atAnd
パラメータ:
e - Exp
戻り値:
Exp

atOr

protected Exp atOr(Exp e)
At and expression node.

オーバーライド:
クラス ToHirVisit 内の atOr
パラメータ:
e - Exp
戻り値:
Exp

atXor

protected Exp atXor(Exp e)
At xor expression node.

オーバーライド:
クラス ToHirVisit 内の atXor
パラメータ:
e - Exp
戻り値:
Exp

atCmpEq

protected Exp atCmpEq(Exp e)
At EQ expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpEq
パラメータ:
e - Exp
戻り値:
Exp

atCmpNe

protected Exp atCmpNe(Exp e)
At NE expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpNe
パラメータ:
e - Exp
戻り値:
Exp

atCmpGt

protected Exp atCmpGt(Exp e)
At GT expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpGt
パラメータ:
e - Exp
戻り値:
Exp

atCmpGe

protected Exp atCmpGe(Exp e)
At GE expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpGe
パラメータ:
e - Exp
戻り値:
Exp

atCmpLt

protected Exp atCmpLt(Exp e)
At LT expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpLt
パラメータ:
e - Exp
戻り値:
Exp

atCmpLe

protected Exp atCmpLe(Exp e)
At LE expression node.

オーバーライド:
クラス ToHirVisit 内の atCmpLe
パラメータ:
e - Exp
戻り値:
Exp

atLShift

protected Exp atLShift(Exp e)
At L-shift expression node.

オーバーライド:
クラス ToHirVisit 内の atLShift
パラメータ:
e - Exp
戻り値:
Exp

atARShift

protected Exp atARShift(Exp e)
At arithmetic R-shift expression node.

オーバーライド:
クラス ToHirVisit 内の atARShift
パラメータ:
e - Exp
戻り値:
Exp

atRShift

protected Exp atRShift(Exp e)
At logical R-shift expression node.

オーバーライド:
クラス ToHirVisit 内の atRShift
パラメータ:
e - Exp
戻り値:
Exp

atOffset

protected Exp atOffset(Exp e)
At offset(difference of address) expression node.

オーバーライド:
クラス ToHirVisit 内の atOffset
パラメータ:
e - Exp
戻り値:
Exp

atLgAnd

protected Exp atLgAnd(Exp e)
At logical-and expression node.

オーバーライド:
クラス ToHirVisit 内の atLgAnd
パラメータ:
e - Exp
戻り値:
Exp

atLgOr

protected Exp atLgOr(Exp e)
At logical-or expression node.

オーバーライド:
クラス ToHirVisit 内の atLgOr
パラメータ:
e - Exp
戻り値:
Exp

atSelect

protected Exp atSelect(Exp e)
At selection expression node.

オーバーライド:
クラス ToHirVisit 内の atSelect
パラメータ:
e - Exp
戻り値:
Exp