|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
SubpFlow interface Interface for subprogram flow analysis.
フィールドの概要 | |
static int |
CF_BBLOCK
Item index used in calling methods isComputed, setComputedFlag. |
static int |
CF_CFG
Item index used in calling methods isComputed, setComputedFlag. |
static int |
CF_DOMINATOR
Item index used in calling methods isComputed, setComputedFlag. |
static int |
CF_INDEXED
Item index used in calling methods isComputed, setComputedFlag. |
static int |
CF_POSTDOMINATOR
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_AVAILIN
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_AVAILOUT
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEF
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFIN
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFINED
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFOUT
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFUSE
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFUSEEXHAUST
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_DEFUSELIST
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_EGEN
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_EKILL
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_EXPID
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_EXPOSED
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_KILL
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_LIVEIN
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_LIVEOUT
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_MAX
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_MIN
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_REACH
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_SETREFREPR
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_TRSNSPARENT
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_USED
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_USEDEFEXHAUST
Item index used in calling methods isComputed, setComputedFlag. |
static int |
DF_USEDEFLIST
Item index used in calling methods isComputed, setComputedFlag. |
static int |
FLAG_EXPID_LHS
|
メソッドの概要 | |
BBlock |
bblock()
Create dummy basic block. |
BBlock |
bblock(LabeledStmt pLabeledStmt)
Create new basic block corresponding to the HIR labeled statement pLabeledStmt. |
BBlockNodeIterator |
bblockNodeIterator(BBlock pBBlock)
bblockNodeItrator Get iterator that traverse all nodes of the basic block pBBlock in the order of from top to bottom, from left to right. |
BBlockStmtIterator |
bblockStmtIterator(BBlockHir pBBlock)
bblockStmtIterator get iterator to traverse statements in the basic block pBBlock. |
BBlockSubtreeIterator |
bblockSubtreeIterator(BBlock pBBlock)
bblockSubtreeItrator Get iterator that traverse top subtrees of the basic block pBBlock. |
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 from the entry BBlock. |
java.util.List |
changeListOfFlowBBlocksToListOfAflowBBlocks(java.util.List pListOfFlowBBlocks)
|
void |
clearControlFlow()
Clear all control/data flow analysis information. |
void |
clearDataFlow()
Clear data flow information. |
void |
computeBBlockSetRefReprs()
|
java.util.Set |
computeSetOfAddressTakenVariables()
|
java.util.Set |
computeSetOfGlobalVariables()
|
void |
copyFlowAnalData(SubpFlow pSubpFlow)
|
DefVector |
defVector()
|
DefVectorIterator |
defVectorIterator(DefVector pDefVector)
|
ExpVector |
expVector()
|
ExpVectorIterator |
expVectorIterator(ExpVector pExpVector)
|
FlowAnalSymVector |
flowAnalSymVector()
|
java.lang.String |
generateExpIdName()
generateExpIdName Generate a name of expression identifier _xId1, _xId2, _xId3, ... |
int |
getAssignCount()
|
BBlock |
getBBlock(HIR pHIR)
|
BBlock |
getBBlock(int pBlockNumber)
getBBlock Get the basic block whose block number is pBlockNumber. |
BBlock |
getBBlock0(Label pLabel)
|
BBlock |
getBBlockForLabel(Label pLabel)
|
BBlock |
getBBlockFromNodeIndex(int pNodeIndex)
|
java.util.List |
getBBlockList()
Returns the List of BBlocks in the flow excluding null and 0-numbered BBlock. |
BBlock |
getBBlockOfIR(int pIndex)
|
java.util.ArrayList |
getBBlockTable()
Get BBlockTable of this subprogram. |
int |
getBBlockVectorBitCount()
|
int |
getBBlockVectorWordCount()
|
int |
getCallCount()
|
int |
getComplexityLevel()
Get the complexity level of this subprogram. 1: simple. |
int |
getDefCount()
|
int |
getDefIndex(int pNodeIndex)
Get def-index from node index. |
java.util.Set |
getDefinedSyms()
getDefinedSyms Set of all symbols whose value is set in this subprogram. |
java.util.List |
getDefNodeList(FlowAnalSym pSym)
|
IR |
getDefPoint(int pIndex)
Get IR node from def-index. |
DefUseList |
getDefUseExhaustiveList()
|
DefUseList |
getDefUseList()
|
int |
getDefVectorBitCount()
|
int |
getDefVectorWordCount()
|
java.util.List |
getDominatorList(BBlock pBBlock)
Get the list of dominators of pBBlock. |
BBlockVector |
getDominators(BBlock pBBlock)
Get BBlockVector representing dominators of pBBlock. |
BBlock |
getEntryBBlock()
Get the entry basic block. |
BBlock |
getExitBBlock()
|
ExpId |
getExpId(IR pIr)
|
ExpId |
getExpId(IR pIr,
int pIndex)
|
java.util.List |
getExpIdList()
|
Exp |
getExpOfTemp(Var pTempVar)
Get the expression represented by the temporal variable pTempVar. |
int |
getExpVectorBitCount()
|
int |
getExpVectorWordCount()
|
FlowAdapter |
getFlowAdapter()
|
int |
getFlowAnalStateLevel()
|
FlowAnalSym[] |
getFlowAnalSymTable()
|
FlowRoot |
getFlowRoot()
|
IR |
getIndexedNode(int pNodeIndex)
|
FlowAnalSym |
getIndexedSym(int pSymIndex)
|
int |
getIrIndexMax()
|
int |
getIrIndexMin()
|
HIR |
getLinkedSubtreeOfExpId(ExpId pExpId)
|
java.util.List |
getListOfBBlocksFromEntry()
|
java.util.List |
getListOfBBlocksFromExit()
|
java.util.Set |
getMaximalCompoundVars()
Get the set of maximal compound variables. |
int |
getNumberOfBBlocks()
|
int |
getNumberOfDefUsedGlobalSymbols()
|
int |
getNumberOfNodes()
|
int |
getPointVectorBitCount()
|
int |
getPointVectorWordCount()
|
java.util.List |
getPostDominatorList(BBlock pBBlock)
Get the list of post dominators of pBBlock. |
BBlockVector |
getPostDominators(BBlock pBBlock)
Get BBlockVector representing post dominators of pBBlock. |
BBlock |
getPrevBBlockInSearch()
|
java.util.List |
getReachableBBlocks()
Get list of BBlocks reachable from entry BBLock. |
RecordAlias |
getRecordAlias()
If returned value is not null, then alias is considered in data flow analysis. |
IR |
getRefPoint(int pIndex)
Get IR node from ref-index |
boolean |
getRestructureFlag()
|
SetRefReprList |
getSetRefReprList(BBlock pBBlock)
|
SetRefRepr |
getSetRefReprOfIR(IR pIR)
|
SubpDefinition |
getSubpDefinition()
|
Subp |
getSubpSym()
|
int |
getSymExpCount()
|
UseDefList |
getUseDefExhaustiveList()
|
UseDefList |
getUseDefList()
|
int |
getUsedSymCount()
|
java.util.Set |
getUsedSyms()
getUsed Set of all symbols whose value is used in this subprogram. |
java.util.List |
geUseNodeList(FlowAnalSym pSym)
|
boolean |
hasCall()
|
boolean |
hasCallUnder(IR pIR)
Returns true if the given IR node has as its decendant a call node. |
void |
initiateControlFlowAnal(SubpDefinition pSubpDefinition,
int pIndexMin,
int pIndexMax)
|
void |
initiateDataFlowAnal(SubpDefinition pSubpDefinition)
initiateDataFlowAnal Initiate bit vectors, and initiate fields in SetRefRepls, etc. |
boolean |
isComputed(int pItemIndex)
Test if a control/data flow item is already computed or not. |
boolean |
isComputedOrUnderComputation(int pItemIndex)
|
boolean |
isFailed()
|
PointVector |
pointVector()
|
PointVectorIterator |
pointVectorIterator(PointVector pPointVector)
|
void |
printExpIdAndIrCorrespondence()
|
void |
recordBBlock(BBlock pBlock,
int pBlockNumber)
|
int |
recordDefPoint(IR pIR)
|
int |
recordDefRefPoint(IR pIR)
|
void |
resetComputedFlag(int pItemIndex)
Reset computed flag for all items whose item numbers are greater or equal to pItemIndex. |
void |
resetControlAndDataFlowInformation()
Clear all control/data flow analysis information after executing setIndexNumberTOAllNodes. |
void |
resetFlowSymLink(SymTable pSymTable)
resetFlowSymLink Reset all flow analysis information of symbols in pSymTable and its descendents. |
void |
resetFlowSymLinkForRecordedSym()
linkLirWithDataFlowForSubp Reset links between flow information and LIR nodes, symbols, etc. |
void |
resetGlobalFlowSymLink()
resetGlobalFlowSymLink Reset all flow analysis information of symbols that are contained in ancestor symbol table (symTableRoot, etc) without traversing its descendents. |
void |
setBBlock(HIR pHir,
BBlock pBBlock)
|
void |
setBBlock(Label pLabel,
BBlock pBBlock)
|
void |
setBBlockVectorBitCount(int pBitCount)
|
void |
setComputedFlag(int pItemIndex)
Set the control/data flow item to be computed as true. |
void |
setDefVectorBitCount(int pBitCount)
|
void |
setEntryBBlock(BBlock pBlock)
|
void |
setExitBBlock(BBlock pBlock)
|
void |
setExpId(IR pIr,
ExpId pFlowExpId)
|
void |
setExpOfTemp(Var pTempVar,
Exp pExp)
Record pExp as the expression represented by the temporal variable pTempVar. |
void |
setExpVectorBitCount(int pBitCount)
|
void |
setFlowAnalStateLevel(int pState)
|
void |
setNumberOfNodes(int pCount)
|
java.util.Set |
setOfAddressTakenVariables()
|
java.util.Set |
setOfGlobalVariables()
|
void |
setPointVectorBitCount(int pBitCount)
|
void |
setPrevBBlockInSearch(BBlock pPrev)
setPrevBBlockInSearch getPrevBBlockInSearch Methods used in linking basic blocks in depth first order, etc. |
void |
setRecordAlias(RecordAlias pRecordAlias)
Record a RecordAlias instance in order to indicate that alias is considered in data flow analysis. |
void |
setRestructureFlag()
|
void |
setSetRefReprList(BBlock pBBlock,
SetRefReprList pSetRefReprList)
|
void |
setSetRefReprOfIR(SetRefRepr pSetRefRepr,
IR pIR)
|
void |
setUnderComputation(int pItemIndex)
Set computed flag for the item indicated by pItemIndex. |
java.util.List |
sortExpIdCollection(java.util.Collection pExpIdCollection)
Sort the list or set of FLowAnalSyms (pExpIdCollection) so that non-ExpId symbols come first and then ExpIds sorted in the ascending order of suffix (nn of of the name of ExpId _xIdnn). |
java.util.Set |
subtreesContainingCall()
|
void |
summarize()
summarize Summarize the data flow analysis for this subprogram, that is, compute defined set and used set after creating these sets which can be accessed by getDefinedSyms & getUsedSyms. |
フィールドの詳細 |
public static final int CF_INDEXED
public static final int CF_BBLOCK
public static final int CF_CFG
public static final int CF_DOMINATOR
public static final int CF_POSTDOMINATOR
public static final int DF_MIN
public static final int DF_EXPID
public static final int DF_SETREFREPR
public static final int DF_DEF
public static final int DF_KILL
public static final int DF_REACH
public static final int DF_DEFINED
public static final int DF_USED
public static final int DF_EXPOSED
public static final int DF_EGEN
public static final int DF_EKILL
public static final int DF_AVAILIN
public static final int DF_AVAILOUT
public static final int DF_LIVEIN
public static final int DF_LIVEOUT
public static final int DF_DEFIN
public static final int DF_DEFOUT
public static final int DF_DEFUSE
public static final int DF_DEFUSELIST
public static final int DF_USEDEFLIST
public static final int DF_DEFUSEEXHAUST
public static final int DF_USEDEFEXHAUST
public static final int DF_TRSNSPARENT
public static final int DF_MAX
public static final int FLAG_EXPID_LHS
メソッドの詳細 |
public BBlock getEntryBBlock()
public void setEntryBBlock(BBlock pBlock)
public BBlock getExitBBlock()
public void setExitBBlock(BBlock pBlock)
public void copyFlowAnalData(SubpFlow pSubpFlow)
public BBlock bblock(LabeledStmt pLabeledStmt)
public BBlock bblock()
public ExpVector expVector()
public PointVector pointVector()
public DefVector defVector()
public FlowAnalSymVector flowAnalSymVector()
public void resetFlowSymLinkForRecordedSym()
public void resetFlowSymLink(SymTable pSymTable)
public void resetGlobalFlowSymLink()
public BBlock getBBlock(int pBlockNumber)
pBlockNumber
- block number of the basic block to be got.
public void recordBBlock(BBlock pBlock, int pBlockNumber)
public FlowAnalSym getIndexedSym(int pSymIndex)
public IR getIndexedNode(int pNodeIndex)
public BBlock getBBlockFromNodeIndex(int pNodeIndex)
public int getNumberOfBBlocks()
public int getNumberOfNodes()
public void setNumberOfNodes(int pCount)
public int getSymExpCount()
public int getUsedSymCount()
public java.lang.String generateExpIdName()
public void initiateControlFlowAnal(SubpDefinition pSubpDefinition, int pIndexMin, int pIndexMax)
public void initiateDataFlowAnal(SubpDefinition pSubpDefinition)
pSubpDefinition
- definition of subprogram to be analyzed.public SubpDefinition getSubpDefinition()
public Subp getSubpSym()
public int getNumberOfDefUsedGlobalSymbols()
public int getPointVectorBitCount()
public void setPointVectorBitCount(int pBitCount)
public int getPointVectorWordCount()
public int getExpVectorBitCount()
public void setExpVectorBitCount(int pBitCount)
public int getExpVectorWordCount()
public int getDefVectorBitCount()
public void setDefVectorBitCount(int pBitCount)
public int getDefVectorWordCount()
public int getBBlockVectorBitCount()
public void setBBlockVectorBitCount(int pBitCount)
public int getBBlockVectorWordCount()
public IR getRefPoint(int pIndex)
pIndex
- ref index (fSubpFlow.fDefRefIndex[nodeIndex])
public IR getDefPoint(int pIndex)
pIndex
- def index (fSubpFlow.fDefIndex[nodeIndex])
public int getDefIndex(int pNodeIndex)
pNodeIndex
- IR node index.
public int recordDefRefPoint(IR pIR)
public int recordDefPoint(IR pIR)
public int getAssignCount()
public int getCallCount()
public void setPrevBBlockInSearch(BBlock pPrev)
pPrev
- previous BBlock from which this BBlock is
to be linked.public BBlock getPrevBBlockInSearch()
public java.util.Set getDefinedSyms()
public java.util.Set getUsedSyms()
public void summarize()
public java.util.Iterator cfgIterator()
public java.util.Iterator cfgFromExitIterator()
public BBlockSubtreeIterator bblockSubtreeIterator(BBlock pBBlock)
public BBlockStmtIterator bblockStmtIterator(BBlockHir pBBlock)
public BBlockNodeIterator bblockNodeIterator(BBlock pBBlock)
public PointVectorIterator pointVectorIterator(PointVector pPointVector)
public DefVectorIterator defVectorIterator(DefVector pDefVector)
public ExpVectorIterator expVectorIterator(ExpVector pExpVector)
public int getFlowAnalStateLevel()
public void setFlowAnalStateLevel(int pState)
public java.util.List getBBlockList()
public java.util.ArrayList getBBlockTable()
public java.util.List getReachableBBlocks()
public BBlock getBBlock(HIR pHIR)
public BBlock getBBlockOfIR(int pIndex)
public BBlock getBBlockForLabel(Label pLabel)
public void setBBlock(HIR pHir, BBlock pBBlock)
public void setBBlock(Label pLabel, BBlock pBBlock)
public HIR getLinkedSubtreeOfExpId(ExpId pExpId)
public DefUseList getDefUseList()
public DefUseList getDefUseExhaustiveList()
public java.util.List getDefNodeList(FlowAnalSym pSym)
public UseDefList getUseDefList()
public UseDefList getUseDefExhaustiveList()
public java.util.List geUseNodeList(FlowAnalSym pSym)
public int getIrIndexMin()
public int getIrIndexMax()
public int getDefCount()
public ExpId getExpId(IR pIr)
public ExpId getExpId(IR pIr, int pIndex)
public void setExpId(IR pIr, ExpId pFlowExpId)
public java.util.List getExpIdList()
public void printExpIdAndIrCorrespondence()
public void clearControlFlow()
public void clearDataFlow()
public void resetControlAndDataFlowInformation()
public java.util.Set computeSetOfGlobalVariables()
public java.util.Set computeSetOfAddressTakenVariables()
public void computeBBlockSetRefReprs()
public java.util.Set setOfGlobalVariables()
public java.util.Set setOfAddressTakenVariables()
public void setRestructureFlag()
public boolean getRestructureFlag()
public void setRecordAlias(RecordAlias pRecordAlias)
pRecordAlias
- is an instance of RecordAlias keeping the
the result of alias analysis for this subprogram.public RecordAlias getRecordAlias()
public SetRefReprList getSetRefReprList(BBlock pBBlock)
public void setSetRefReprList(BBlock pBBlock, SetRefReprList pSetRefReprList)
public java.util.Set subtreesContainingCall()
public void setExpOfTemp(Var pTempVar, Exp pExp)
pTempVar
- variable introduced to represent an expression
(in process of optimization, etc.).pExp
- public Exp getExpOfTemp(Var pTempVar)
pTempVar
- variable introduced to represent an expression
(in process of optimization, etc.).
public BBlock getBBlock0(Label pLabel)
public SetRefRepr getSetRefReprOfIR(IR pIR)
public void setSetRefReprOfIR(SetRefRepr pSetRefRepr, IR pIR)
public java.util.List getListOfBBlocksFromEntry()
public java.util.List getListOfBBlocksFromExit()
public FlowRoot getFlowRoot()
public boolean isFailed()
public boolean isComputed(int pItemIndex)
pItemIndex
- item index CF_INDEXED .. DF_DEFUSELIST.
public void setComputedFlag(int pItemIndex)
pItemIndex
- item index CF_INDEXED .. DF_DEFUSELIST.public void setUnderComputation(int pItemIndex)
pItemIndex
- public void resetComputedFlag(int pItemIndex)
pItemIndex
- public boolean isComputedOrUnderComputation(int pItemIndex)
public int getComplexityLevel()
public boolean hasCall()
public boolean hasCallUnder(IR pIR)
public FlowAdapter getFlowAdapter()
public java.util.List changeListOfFlowBBlocksToListOfAflowBBlocks(java.util.List pListOfFlowBBlocks)
public java.util.Set getMaximalCompoundVars()
public FlowAnalSym[] getFlowAnalSymTable()
public BBlockVector getDominators(BBlock pBBlock)
pBBlock
- Basic block.
public BBlockVector getPostDominators(BBlock pBBlock)
pBBlock
- Basic block.
public java.util.List getDominatorList(BBlock pBBlock)
pBBlock
- Basic block.
public java.util.List getPostDominatorList(BBlock pBBlock)
pBBlock
- Basic block.
public java.util.List sortExpIdCollection(java.util.Collection pExpIdCollection)
pExpIdCollection
- list or set of FlowAnalSyms.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |