coins.opt
クラス LoopExpansion

java.lang.Object
  |
  +--coins.opt.LoopExpansion
直系の既知のサブクラス:
LoopUnrolling, LoopUnswitching

public abstract class LoopExpansion
extends java.lang.Object

title: LoopExpansion class.

description: Abstract class for Loop Expansion implement class.


フィールドの概要
protected  int fDbgLevel
           
protected  FlowRoot flowRoot
           
protected  int fMaxAllowableNodesInLoopBody
           
protected  int fNumberOfGeneralRegisters
           
protected  java.util.Map fOptionMap
           
protected  CoinsOptions fOptions
           
protected  HirRoot hirRoot
           
protected  IoRoot ioRoot
           
protected  SymRoot symRoot
           
 
コンストラクタの概要
protected LoopExpansion(HirRoot phirRoot)
          Construct this object
 
メソッドの概要
protected  int calcStatementCount(Stmt pStmt)
          Calculate Stmt count in pStmt.
abstract  boolean doSubprogram(SubpDefinition pSubpDef)
          Do Optimize in subprogram.
protected  Var getArrayVar(SubscriptedExp Subs)
          Get array Var SubscriptedExp has.
protected  Debug getDebug()
          Get Debug this object refer.
 int getMaxAllowableStmtsInLoopBody()
          Get max statement count in loopbody of which allow expand.
protected  Exp getSimpleExp(Exp pExp)
          Get simple Exp for Conv'ed, or Undecay'ed Exp.
protected  java.util.Set getSubscriptVar(SubscriptedExp Subs)
          Get subscript Vars SubscriptedExp has.
protected  boolean hasBadElement(Stmt pStmt)
          Check whether Stmt contains bad element.
protected  boolean isBadElement(HIR hirElement)
          Check whether hir element is bad for loop optimizations, is follows at least.
 void setMaxAllowableStmtsInLoopBody(int pMaxAllowableStmtCount)
          Set max statement count in loopbody of which allow expand.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

hirRoot

protected HirRoot hirRoot

flowRoot

protected FlowRoot flowRoot

symRoot

protected SymRoot symRoot

ioRoot

protected IoRoot ioRoot

fOptionMap

protected java.util.Map fOptionMap

fOptions

protected CoinsOptions fOptions

fNumberOfGeneralRegisters

protected int fNumberOfGeneralRegisters

fMaxAllowableNodesInLoopBody

protected int fMaxAllowableNodesInLoopBody

fDbgLevel

protected int fDbgLevel
コンストラクタの詳細

LoopExpansion

protected LoopExpansion(HirRoot phirRoot)
Construct this object

パラメータ:
phirRoot - HIR root object.
メソッドの詳細

getMaxAllowableStmtsInLoopBody

public int getMaxAllowableStmtsInLoopBody()
Get max statement count in loopbody of which allow expand.

戻り値:
max statement count in loopbody of which allow expand.

setMaxAllowableStmtsInLoopBody

public void setMaxAllowableStmtsInLoopBody(int pMaxAllowableStmtCount)
Set max statement count in loopbody of which allow expand.

パラメータ:
pMaxAllowableStmtCount - max statement count in loopbody of which allow expand.

doSubprogram

public abstract boolean doSubprogram(SubpDefinition pSubpDef)
Do Optimize in subprogram.

パラメータ:
pSubpDef - SubpDefinition to do optimization.
戻り値:
true if optimized, false if else.

getDebug

protected Debug getDebug()
Get Debug this object refer.

戻り値:
Debug this object refer

getSimpleExp

protected Exp getSimpleExp(Exp pExp)
Get simple Exp for Conv'ed, or Undecay'ed Exp.

パラメータ:
pExp - Exp object.
戻り値:
Simple Exp for Conv'ed, or Undecay'ed Exp.

isBadElement

protected boolean isBadElement(HIR hirElement)
Check whether hir element is bad for loop optimizations, is follows at least. CallStmt volatiled sym

戻り値:
true if Stmt contains CallStmt, false if else.

hasBadElement

protected boolean hasBadElement(Stmt pStmt)
Check whether Stmt contains bad element.

パラメータ:
pStmt - Stmt object.
戻り値:
true if Stmt contains CallStmt, false if else.

calcStatementCount

protected int calcStatementCount(Stmt pStmt)
Calculate Stmt count in pStmt. but exclude follows: LabeledStmt BlockStmt

パラメータ:
pStmt - Stmt object.
戻り値:
Stmt count of pStmt has.

getArrayVar

protected Var getArrayVar(SubscriptedExp Subs)
Get array Var SubscriptedExp has.

パラメータ:
Subs - SubscriptedExp object
戻り値:
Var that is array var of array.

getSubscriptVar

protected java.util.Set getSubscriptVar(SubscriptedExp Subs)
Get subscript Vars SubscriptedExp has. which is counted SubscriptedExp that is child of Parent SubscriptedExp.

パラメータ:
Subs - SubscriptedExp object
戻り値:
Set of Var that is subscript exp of array.