|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--coins.opt.LoopExpansion | +--coins.opt.LoopUnrolling
title: LoopUnrolling class. description: Expand LoopStmt.
フィールドの概要 | |
protected int |
fExpRate
Optimize option: Rate of loop unrolling; expand count of loop body. |
protected int |
fNodeCountMultipliedByExpFactor
|
protected int |
fUpperLimitOfExpansionFactor
|
クラス coins.opt.LoopExpansion から継承したフィールド |
fDbgLevel, flowRoot, fMaxAllowableNodesInLoopBody, fNumberOfGeneralRegisters, fOptionMap, fOptions, hirRoot, ioRoot, symRoot |
コンストラクタの概要 | |
LoopUnrolling(HirRoot phirRoot)
Construct this object. |
|
LoopUnrolling(HirRoot pHirRoot,
int pExpansionFactor,
int pMaxAllowableNodesInLoopBody,
int pNodeCountMultipliedByExpFactor)
Constructor specifying loop unrolling parameters. |
メソッドの概要 | |
protected int |
computeExpansionFactor(LoopStmt pLoopStmt)
|
boolean |
doSubprogram(SubpDefinition pSubpDef)
Do Loop Expansion optimization in subprogram. |
protected void |
expandLoop(ForStmt pForStmt)
|
int |
getExpRate()
Get the rate of loop unrolling; expand count of loop body. |
protected Exp |
getStepExp(Stmt pStmt)
Generate Exp of step in pBlock it is called to get Exp which represents amount of increase of Loop-control-variable in Loop-step-part. |
protected Exp |
integralPromotion(int pOperator,
Exp pOperand1)
|
protected Exp |
integralPromotion(int pOperator,
Exp pOperand1,
Exp pOperand2)
|
protected boolean |
isBadElement(HIR hirElement)
Check whether hir element is bad for loop expansion, is follows CallStmt volatiled sym and JumpStmt at loop expand optimization. |
protected boolean |
isExpansible(ForStmt pForStmt)
Check whether loop-unrolling optimization can be applied to pForStmt The Loop-control-variable is set to fLoopVar. |
boolean |
isSIMD()
Get Optimize option considering SIMD environment. |
protected AssignStmt |
makeAssignStmt(Var pVariable,
Exp pExp)
|
protected Stmt |
mergeAssignStmt(Stmt pStmt,
Const pStepConst)
Applies merge-assingment optimization to pStepConst. |
protected void |
pickUpVariables(ForStmt pForStmt)
Analyze variables contained in ForStmt to get information to doing Loop expansion optimization. |
protected HIR |
replaceExpAdjustingType(Exp lOld,
Exp lNew)
Replace expression lOld by lNew adjusting type to that of lOld. |
void |
setExpRate(int pRate)
Set the rate of loop unrolling; expand count of loop body. |
void |
setSIMD_Environment(boolean isSIMD)
Set Optimize option by Considering SIMD environment. |
protected Type |
typeForArithmeticExp(Type pType)
|
クラス coins.opt.LoopExpansion から継承したメソッド |
calcStatementCount, getArrayVar, getDebug, getMaxAllowableStmtsInLoopBody, getSimpleExp, getSubscriptVar, hasBadElement, setMaxAllowableStmtsInLoopBody |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected int fExpRate
protected int fUpperLimitOfExpansionFactor
protected int fNodeCountMultipliedByExpFactor
コンストラクタの詳細 |
public LoopUnrolling(HirRoot phirRoot)
phirRoot
- HirRoot object.public LoopUnrolling(HirRoot pHirRoot, int pExpansionFactor, int pMaxAllowableNodesInLoopBody, int pNodeCountMultipliedByExpFactor)
pHirRoot
- HirRoot instance.pExpansionFactor
- upper limit of loop expansion factor.pMaxAllowableNodesInLoopBody
- maximum number of allowable
nodes in loop body.pNodeCountMultipliedByExpFactor
- upper limit of the number of nodes
in loop body after loop expansion.メソッドの詳細 |
public boolean isSIMD()
public void setSIMD_Environment(boolean isSIMD)
isSIMD
- Optimize by considering SIMD environment.public int getExpRate()
public void setExpRate(int pRate)
pRate
- Rate of loop unrolling; expand count of loop body.
it is allowed more than 2.public boolean doSubprogram(SubpDefinition pSubpDef)
LoopExpansion
内の doSubprogram
pSubpDef
- SubpDefinition to do optimization.
protected void pickUpVariables(ForStmt pForStmt)
pForStmt
- ForStmt to be analyzed.protected boolean isExpansible(ForStmt pForStmt)
pForStmt
- ForStmt object.
protected void expandLoop(ForStmt pForStmt)
protected Exp getStepExp(Stmt pStmt)
protected Stmt mergeAssignStmt(Stmt pStmt, Const pStepConst)
pStmt
- Stmt objectpStepConst
- Const object
which represents increase in loop step
protected boolean isBadElement(HIR hirElement)
LoopExpansion
内の isBadElement
protected int computeExpansionFactor(LoopStmt pLoopStmt)
protected Exp integralPromotion(int pOperator, Exp pOperand1, Exp pOperand2)
protected Exp integralPromotion(int pOperator, Exp pOperand1)
protected AssignStmt makeAssignStmt(Var pVariable, Exp pExp)
protected Type typeForArithmeticExp(Type pType)
protected HIR replaceExpAdjustingType(Exp lOld, Exp lNew)
lOld
- old expression to be replaced.lNew
- new expression for replacement.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |