|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.aflow.SubpFlowImpl
SubpFlowImpl class: Subprogram flow analysis class. Fields and methods are common between HIR and LIR.
| Field Summary | |
protected BBlock[] |
fBBlockOfIR
|
protected FAList |
fBBlockTable
|
protected BBlock |
fCurrentBBlock
|
protected IrList |
fDfoList
|
protected BBlock |
fEntryBBlock
|
protected BBlock |
fExitBBlock
|
protected FlowExpId[] |
fExpIdTable
|
boolean |
fHirAnalExtended
|
protected IrList |
fInverseDfoList
|
protected int |
fIrIndexMax
|
protected int |
fIrIndexMin
|
Flow |
flow
|
FlowRoot |
flowRoot
|
protected BBlock |
fPrevBBlockInSearch
|
protected java.util.List |
fReachableBBlocks
|
protected RecordAlias |
fRecordAlias
|
RecordSetRefReprs |
fRecordSetRefReprs
|
protected boolean |
fRestructured
|
FlowResults |
fResults
|
protected java.util.Set |
fSetOfAddressTakenVariables
|
protected java.util.Set |
fSetOfGlobalVariables
|
protected SetRefRepr[] |
fSetRefReprTable
|
protected SubpDefinition |
fSubpDefinition
|
protected java.util.Map |
fTempExpCorrespondence
|
HirRoot |
hirRoot
|
IoRoot |
ioRoot
|
SymRoot |
symRoot
|
| Constructor Summary | |
SubpFlowImpl(SubpDefinition pSubpDef,
FlowResults pResults)
|
|
| Method Summary | |
void |
allocateBBlockOfIR()
|
void |
allocateExpIdTable()
|
void |
allocateSetRefReprTable()
|
AssignFlowExpId |
assigner()
Retuns the AssignFlowExpId object this SubpFlow is associated with. |
BBlock |
bblock(LabeledStmt pLabeledStmt)
Create new basic block corresponding to the HIR labeled statement pLabeledStmt. |
BBlockVector |
bblockVector()
Create new basic block corresponding to the LIR Prologue node pPrologue. |
java.util.Iterator |
cfgBfoIterator()
|
java.util.Iterator |
cfgFromExitIterator()
cfgFromExitIterator: Traverse basic blocks in CFG (control flow graph) in inverse depth first order from the exit BBlock. |
java.util.Iterator |
cfgIterator()
cfgIterator: Traverse basic blocks in CFG (control flow graph) in depth first order. |
void |
clear()
Clear flow analysis information by resetting fIrIndexMin = 0, fIrIndexMax = 0, fSetOfGlobalSymbols, fSetOfAddressTakenSymbols. |
java.util.Set |
computeSetOfAddressTakenVariables()
computeSetOfAddressTakenVariables: Compute the set of variables whose address is taken (e.g. |
void |
computeSetOfAddressTakenVariables(HIR pHir,
java.util.Set pSet,
boolean pAddrOperand)
computeSetOfAddressTakenVariables: Compute the set of variables whose address is taken (e.g. |
java.util.Set |
computeSetOfGlobalVariables()
computeSetOfGlobalVariables: Compute the set of global variables and record it in fSetOfGlobalVariables. |
void |
correlateBBlockAndIR()
correlateBBlockAndIR: Correlate BBlock and IR so that getBBlockOfIR(hir.getIndex()) become effective. |
DefVector |
defVector()
|
DefVectorIterator |
defVectorIterator(DefVector pDefVector)
|
ExpVector |
expVector()
|
ExpVectorIterator |
expVectorIterator(ExpVector pExpVector)
|
void |
findDAvailInAvailOut()
Finds the "DAvailIn" and "DAvailOut" vectors for all BBlocks contained in this SubpFlow. |
void |
findDDefInDefOut()
Finds the "DDefIn" and "DDefOut" vectors for all BBlocks contained in this SubpFlow. |
void |
findDDefined()
Finds the "DDefined" vectors for all BBlocks contained in this SubpFlow. |
void |
findDDefUse()
|
void |
findDefUse()
Finds the DefUseLists for all the FlowAnalSyms that appear in this SubpFlow. |
void |
findDEGen()
Finds the "DEGen" vectors for all BBlocks contained in this SubpFlow. |
void |
findDExposedUsed()
Finds the "DExpesed" and "PExposed" vectors for all BBlocks contained in this SubpFlow. |
void |
findDKill()
Finds the "DKill" vectors for all BBlocks contained in this SubpFlow. |
void |
findDReach()
Finds the "DReach" vectors for all BBlocks contained in this SubpFlow. |
void |
findDUseDef()
|
void |
findPDef()
Finds the "PDef" vectors for all BBlocks contained in this SubpFlow. |
void |
findPDefined()
Finds the "PDefined" vectors for all BBlocks contained in this SubpFlow. |
void |
findPEKill()
Finds the "PEKill" vectors for all BBlocks contained in this SubpFlow. |
void |
findPExposedUsed()
Finds the "PExposed" and "PUsed" vectors for all BBlocks contained in this SubpFlow. |
void |
findPKill()
Finds the "PKill" vectors for all BBlocks contained in this SubpFlow. |
void |
findPLiveInLiveOut()
Finds the "PLiveIn" and "PLiveOut" vectors for all BBlocks contained in this SubpFlow. |
void |
findPReach()
Finds the "PReach" vectors for all BBlocks contained in this SubpFlow. |
void |
findUseDef()
Finds the UDLists for all the FlowAnalSyms that appear in this SubpFlow. |
FlowAnalSymVector |
flowAnalSymVector()
|
BBlock |
getBBlock(int pBlockNumber)
getBBlock: Get the basic block whose block number is pBlockNumber. |
BBlock |
getBBlockOfIR(int pIndex)
Get BBlock corresponding to the IR node indexed by pIndex. |
java.util.List |
getBBlocks()
Same as { #getReachableBBlocks()}. |
java.util.List |
getBBlocksFromEntry()
Returns the list of BBlocks in the breadth first order beginning from the entry bblock. |
java.util.List |
getBBlocksFromExit()
Returns the list of BBlocks in the breadth first order beginning from the exit bblock and traversing backward. |
FAList |
getBBlockTable()
List of BBlock object that this SubpFlow has ever recorded. |
DefUseList |
getDefUseList(FlowAnalSym pFlowAnalSym)
Returns the DefUseList for the given FlowAnalSym in this SubpFlow. |
BBlock |
getEntryBBlock()
|
BBlock |
getExitBBlock()
|
FlowExpId |
getExpId(IR pIr)
|
FlowExpId |
getExpId(IR pIr,
int pIndex)
|
Exp |
getExpOfTemp(Var pTempVar)
Get the expression represented by the temporal variable pTempVar. |
FAList |
getFlowExpIdTable()
Returns the FlowExpId table (index number and its associated FlowExpId) for this SubpFlow. |
int |
getIrIndexMax()
|
int |
getIrIndexMin()
|
int |
getNumberOfBBlocks()
|
int |
getNumberOfRelevantBBlocks()
Number of reachable BBlocks. |
java.util.List |
getReachableBBlocks()
Returns a list of BBlocks that are reachable from the entry BBlock. |
RecordAlias |
getRecordAlias()
If returned value is not null, then alias is considered in data flow analysis. |
boolean |
getRestructureFlag()
|
SetRefRepr |
getSetRefReprOfIR(int pIndex)
Get SetRefRepr corresponding to the IR node indexed by pIndex. |
FAList |
getSetRefReprs()
Returns the list of SetRefRepr objects within this SubpFlow. |
SubpDefinition |
getSubpDefinition()
|
Subp |
getSubpSym()
|
FAList |
getSymIndexTable()
Returns the table of symbols possibly accessed in this SubpFlow. |
UDList |
getUDList(FlowAnalSym pFlowAnalSym)
Returns the UDList for the given FlowAnalSym in this SubpFlow. |
void |
initiateDataFlow()
Initiate data flow analysis. |
void |
makeDominatorTree()
Makes the dominator tree. |
void |
makePostdominatorTree()
Makes the postdominator tree. |
PointVector |
pointVector()
|
PointVectorIterator |
pointVectorIterator(PointVector pPointVector)
|
void |
printExpIdTable()
|
void |
recordBBlock(BBlock pBlock)
|
FlowResults |
results()
|
void |
setBBlockOfIR(BBlock pBBlock,
int pIndex)
Set BBlock corresponding to the IR node indexed by pIndex. |
void |
setBBlocks(java.util.List pBBlocks)
Same as { #setReachableBBlocks()}. |
void |
setDefUseList(FlowAnalSym pFlowAnalSym,
DefUseList pDefUseList)
Sets the DefUseList for the given FlowAnalSym in this SubpFlow. |
void |
setEntryBBlock(BBlock pBlock)
|
void |
setExitBBlock(BBlock pBBlock)
|
void |
setExpId(IR pIr,
FlowExpId pFlowExpId)
|
void |
setExpOfTemp(Var pTempVar,
Exp pExp)
Record pExp as the expression represented by the temporal variable pTempVar. |
void |
setFlowExpIdTable(FAList pFlowExpIdTable)
Sets the FlowExpId table (index number and its associated FlowExpId) for this SubpFlow. |
java.util.Set |
setOfAddressTakenVariables()
|
java.util.Set |
setOfGlobalVariables()
|
void |
setReachableBBlocks(java.util.List pBBlocks)
Sets a list of BBlocks that are reachable from the entry BBlock. |
void |
setRecordAlias(RecordAlias pRecordAlias)
Record a RecordAlias instance in order to indicate that alias is considered in data flow analysis. |
void |
setRestructureFlag()
|
void |
setSetRefReprOfIR(SetRefRepr pSetRefRepr,
int pIndex)
Set SetRefRepr corresponding to the IR node indexed by pIndex. |
void |
setSetRefReprs(FAList pSetReprs)
Sets the list of SetRefRepr objects within this SubpFlow. |
void |
setSymIndexTable(FAList pSymIndexTable)
Sets the table of symbols possibly accessed in this SubpFlow. |
void |
setUDList(FlowAnalSym pFlowAnalSym,
UDList pUDList)
Sets the UDList for the given FlowAnalSym in this SubpFlow. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface coins.aflow.SubpFlow |
bblockSubtreeIterator, controlFlowAnal |
| Field Detail |
public final FlowRoot flowRoot
public final IoRoot ioRoot
public final SymRoot symRoot
public final HirRoot hirRoot
public final Flow flow
protected SubpDefinition fSubpDefinition
protected BBlock fPrevBBlockInSearch
protected BBlock fEntryBBlock
protected BBlock fExitBBlock
protected BBlock fCurrentBBlock
protected FAList fBBlockTable
protected IrList fDfoList
protected IrList fInverseDfoList
protected java.util.List fReachableBBlocks
public final FlowResults fResults
public boolean fHirAnalExtended
public RecordSetRefReprs fRecordSetRefReprs
protected SetRefRepr[] fSetRefReprTable
protected BBlock[] fBBlockOfIR
protected int fIrIndexMin
protected int fIrIndexMax
protected FlowExpId[] fExpIdTable
protected boolean fRestructured
protected java.util.Set fSetOfGlobalVariables
protected java.util.Set fSetOfAddressTakenVariables
protected java.util.Map fTempExpCorrespondence
protected RecordAlias fRecordAlias
| Constructor Detail |
public SubpFlowImpl(SubpDefinition pSubpDef,
FlowResults pResults)
| Method Detail |
public BBlock getEntryBBlock()
getEntryBBlock in interface SubpFlowpublic void setEntryBBlock(BBlock pBlock)
setEntryBBlock in interface SubpFlowpublic BBlock getExitBBlock()
getExitBBlock in interface SubpFlowpublic void setExitBBlock(BBlock pBBlock)
setExitBBlock in interface SubpFlowpublic BBlock bblock(LabeledStmt pLabeledStmt)
SubpFlow
bblock in interface SubpFlowpublic BBlockVector bblockVector()
SubpFlow
bblockVector in interface SubpFlowpublic ExpVector expVector()
expVector in interface SubpFlowpublic PointVector pointVector()
pointVector in interface SubpFlowpublic DefVector defVector()
defVector in interface SubpFlowpublic FlowAnalSymVector flowAnalSymVector()
flowAnalSymVector in interface SubpFlowpublic PointVectorIterator pointVectorIterator(PointVector pPointVector)
public DefVectorIterator defVectorIterator(DefVector pDefVector)
public ExpVectorIterator expVectorIterator(ExpVector pExpVector)
public BBlock getBBlock(int pBlockNumber)
SubpFlow
getBBlock in interface SubpFlowpublic void recordBBlock(BBlock pBlock)
recordBBlock in interface SubpFlowpublic int getNumberOfBBlocks()
getNumberOfBBlocks in interface SubpFlowpublic SubpDefinition getSubpDefinition()
getSubpDefinition in interface SubpFlowpublic Subp getSubpSym()
getSubpSym in interface SubpFlowpublic java.util.Iterator cfgIterator()
cfgIterator in interface SubpFlowpublic java.util.Iterator cfgFromExitIterator()
SubpFlow
cfgFromExitIterator in interface SubpFlowpublic FAList getBBlockTable()
SubpFlow
getBBlockTable in interface SubpFlowpublic java.util.List getBBlocks()
SubpFlow
getBBlocks in interface SubpFlowpublic void setBBlocks(java.util.List pBBlocks)
SubpFlow
setBBlocks in interface SubpFlowpublic java.util.List getReachableBBlocks()
SubpFlow
getReachableBBlocks in interface SubpFlowpublic void setReachableBBlocks(java.util.List pBBlocks)
SubpFlow
setReachableBBlocks in interface SubpFlowpublic java.util.List getBBlocksFromEntry()
SubpFlow
getBBlocksFromEntry in interface SubpFlowpublic java.util.List getBBlocksFromExit()
SubpFlow
getBBlocksFromExit in interface SubpFlowpublic int getNumberOfRelevantBBlocks()
SubpFlow
getNumberOfRelevantBBlocks in interface SubpFlowpublic FAList getFlowExpIdTable()
SubpFlow
getFlowExpIdTable in interface SubpFlowpublic void setFlowExpIdTable(FAList pFlowExpIdTable)
SubpFlow
setFlowExpIdTable in interface SubpFlowpublic FlowResults results()
results in interface SubpFlowpublic AssignFlowExpId assigner()
SubpFlow
assigner in interface SubpFlowpublic FAList getSetRefReprs()
SubpFlow
getSetRefReprs in interface SubpFlowpublic void setSetRefReprs(FAList pSetReprs)
SubpFlow
setSetRefReprs in interface SubpFlowpublic java.util.Iterator cfgBfoIterator()
cfgBfoIterator in interface SubpFlowpublic DefUseList getDefUseList(FlowAnalSym pFlowAnalSym)
SubpFlow
getDefUseList in interface SubpFlow
public void setDefUseList(FlowAnalSym pFlowAnalSym,
DefUseList pDefUseList)
SubpFlow
setDefUseList in interface SubpFlowpublic UDList getUDList(FlowAnalSym pFlowAnalSym)
SubpFlow
getUDList in interface SubpFlow
public void setUDList(FlowAnalSym pFlowAnalSym,
UDList pUDList)
SubpFlow
setUDList in interface SubpFlowpublic FAList getSymIndexTable()
SubpFlow
getSymIndexTable in interface SubpFlowpublic void setSymIndexTable(FAList pSymIndexTable)
SubpFlow
setSymIndexTable in interface SubpFlowpublic void makeDominatorTree()
SubpFlow
makeDominatorTree in interface SubpFlowpublic void makePostdominatorTree()
SubpFlow
makePostdominatorTree in interface SubpFlowpublic void initiateDataFlow()
SubpFlow
initiateDataFlow in interface SubpFlowpublic void findPDef()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPDef in interface SubpFlowpublic void findDDefined()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDDefined in interface SubpFlowpublic void findPDefined()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPDefined in interface SubpFlowpublic void findDKill()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDKill in interface SubpFlowpublic void findPKill()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPKill in interface SubpFlowpublic void findDExposedUsed()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDExposedUsed in interface SubpFlowpublic void findPExposedUsed()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPExposedUsed in interface SubpFlowpublic void findDEGen()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDEGen in interface SubpFlowpublic void findPEKill()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPEKill in interface SubpFlowpublic void findDReach()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDReach in interface SubpFlowpublic void findPReach()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPReach in interface SubpFlowpublic void findDAvailInAvailOut()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDAvailInAvailOut in interface SubpFlowpublic void findPLiveInLiveOut()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findPLiveInLiveOut in interface SubpFlowpublic void findDDefInDefOut()
SubpFlowBBlocks contained in this SubpFlow. The control flow graph must already be created.
findDDefInDefOut in interface SubpFlowpublic void findDDefUse()
public void findDUseDef()
public void findDefUse()
SubpFlowDefUseLists for all the FlowAnalSyms that appear in this SubpFlow. The control flow graph must already be created.
findDefUse in interface SubpFlowpublic void findUseDef()
SubpFlowUDLists for all the FlowAnalSyms that appear in this SubpFlow. The control flow graph must already be created.
findUseDef in interface SubpFlowpublic void allocateSetRefReprTable()
public SetRefRepr getSetRefReprOfIR(int pIndex)
SubpFlow
getSetRefReprOfIR in interface SubpFlow
public void setSetRefReprOfIR(SetRefRepr pSetRefRepr,
int pIndex)
SubpFlow
setSetRefReprOfIR in interface SubpFlowpublic void correlateBBlockAndIR()
SubpFlow
correlateBBlockAndIR in interface SubpFlowpublic void allocateBBlockOfIR()
public BBlock getBBlockOfIR(int pIndex)
SubpFlow
getBBlockOfIR in interface SubpFlow
public void setBBlockOfIR(BBlock pBBlock,
int pIndex)
SubpFlow
setBBlockOfIR in interface SubpFlowpublic int getIrIndexMin()
getIrIndexMin in interface SubpFlowpublic int getIrIndexMax()
getIrIndexMax in interface SubpFlowpublic void allocateExpIdTable()
allocateExpIdTable in interface SubpFlowpublic FlowExpId getExpId(IR pIr)
getExpId in interface SubpFlow
public FlowExpId getExpId(IR pIr,
int pIndex)
public void setExpId(IR pIr,
FlowExpId pFlowExpId)
setExpId in interface SubpFlowpublic void printExpIdTable()
printExpIdTable in interface SubpFlowpublic java.util.Set setOfGlobalVariables()
setOfGlobalVariables in interface SubpFlowpublic java.util.Set setOfAddressTakenVariables()
setOfAddressTakenVariables in interface SubpFlowpublic void clear()
SubpFlow
clear in interface SubpFlowpublic java.util.Set computeSetOfGlobalVariables()
computeSetOfGlobalVariables in interface SubpFlowpublic java.util.Set computeSetOfAddressTakenVariables()
computeSetOfAddressTakenVariables in interface SubpFlow
public void computeSetOfAddressTakenVariables(HIR pHir,
java.util.Set pSet,
boolean pAddrOperand)
public void setRestructureFlag()
setRestructureFlag in interface SubpFlowpublic boolean getRestructureFlag()
getRestructureFlag in interface SubpFlowpublic void setRecordAlias(RecordAlias pRecordAlias)
SubpFlow
setRecordAlias in interface SubpFlowpRecordAlias - is an instance of RecordAlias keeping the
the result of alias analysis for this subprogram.public RecordAlias getRecordAlias()
SubpFlow
getRecordAlias in interface SubpFlow
public void setExpOfTemp(Var pTempVar,
Exp pExp)
SubpFlow
setExpOfTemp in interface SubpFlowpTempVar - variable introduced to represent an expression
(in process of optimization, etc.).pExp - public Exp getExpOfTemp(Var pTempVar)
SubpFlow
getExpOfTemp in interface SubpFlowpTempVar - variable introduced to represent an expression
(in process of optimization, etc.).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||