|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object | +--coins.flow.DataFlowImpl
Implementation of the DataFlow interface.
There are some dependencies between the methods in this class.
For example, findReach() mustn't be called before both findDef() and findKill() have been called,
and findKill() in turn depends on the result of findDefined().
Access restrictions (or the like) that reflect these dependencies are not yet implemented. Please be careful in using.
findAll() method calls these methods in the correct order.
| フィールドの概要 | |
protected DefVector |
DEF_INVERTED
|
protected DefVector |
DEF_ZERO
|
protected ExpVector |
EXP_INVERTED
|
protected ExpVector |
EXP_ZERO
|
int |
fDbgFlow
|
protected int |
fDefCount
|
protected int[] |
fDefNodeIndexTable
|
protected FlowAnalSym[] |
fFlowAnalSymTable
|
Flow |
flow
|
FlowRoot |
flowRoot
|
protected RecordAlias |
fRecordAlias
|
protected ShowDataFlow |
fShowDataFlow
|
protected SubpFlow |
fSubpFlow
|
protected java.util.Set[] |
fUndefinedUseNodesOfSym
|
HirRoot |
hirRoot
|
IoRoot |
ioRoot
|
ShowDataFlowByName |
showDataFlowByName
|
SymRoot |
symRoot
|
| コンストラクタの概要 | |
DataFlowImpl()
|
|
DataFlowImpl(FlowRoot pFlowRoot,
SubpFlow pSubpFlow)
Constructs a DataFlow instance and prepares for DFA. |
|
| メソッドの概要 | |
protected void |
addEGenExpId(java.util.Set pEGenSet,
java.util.Set pEKillSet,
SetRefRepr pSetRefRepr)
addEGenExpId EGen computation by using ExpId. |
protected void |
allocateSpace()
allocateSpace Allocates space to store BitVector instances for the entire flow. |
protected java.util.Set |
callModSyms(IR pCallNode,
SubpFlow pCurrentSubpFlow)
|
void |
clean()
Cleans the environment that may contain junk information for the current DFA. |
int |
defLookup(int pNodeIndex)
Changes the IR node index into the "Def" index. |
int |
defReverseLookup(int pBitPosition)
Changes the "Def" index into the IR node index. |
int |
expLookup(int pExpIdIndex)
Changes the ExpId index into the position in the ExpVector. |
int |
expReverseLookup(int pBitPosition)
Changes the position in the ExpVector into the ExpId index. |
void |
findAll()
Finds and sets all the data flow information. |
void |
findAllBitVectors()
Finds and sets all the BitVectors, that is, Def, Kill, In, Out, Reach, Defined, Exposed, EGen, EKill, AvailIn, AvailOut, LiveIn, LiveOut, DefIn, and DefOut vectors. |
void |
findAvailInAvailOut()
Finds and sets the AvailIn and AvailOut vectors from the EGen and EKill vectors using the data flow equations. |
void |
findBasic()
Finds and sets the data flow items that are independent of the control flow, that is, Def, Kill, Defined, Exposed, EGen, and EKill vectors. |
void |
findDef()
Finds and sets the Def vectors for the entire flow. |
void |
findDef(BBlock pBBlock)
Finds and sets the Def vector for the given BBlock. |
void |
findDefInDefOut()
Finds and sets the DefIn and DefOut vectors from the Defined vectors using the data flow equations. |
void |
findDefined()
Finds and sets the Defined vectors for the entire flow. |
void |
findDefined(BBlock pBBlock)
Finds and sets the Defined vector for the given BBlock. |
void |
findDefUse()
Finds and sets the DefUseList for each FlowAnalSym without considering side effects of call and alias. |
void |
findDefUseExhaustively()
Finds and sets the DefUseList for each FlowAnalSym considering side effects of call and alias. |
void |
findEGen()
Finds and sets the EGen vectors for the entire flow. |
void |
findEGen(BBlock pBBlock)
Finds and sets the EGen vector for the given BBlock. |
void |
findEKill()
Finds and sets the EKill vectors for the entire flow. |
void |
findEKill(BBlock pBBlock)
Finds and sets the EGen vector for the given BBlock. |
void |
findExposed()
Finds and sets the Exposed vectors for the entire flow. |
void |
findExposed(BBlock pBBlock)
Finds and sets the Exposed vector for the given BBlock. |
void |
findKill()
Finds and sets the Kill vectors for the entire flow. |
void |
findKill(BBlock pBBlock)
Finds and sets the Kill vector for the given BBlock using the Defined vector for that BBlock. |
void |
findLiveInLiveOut()
Finds and sets the LiveIn and LiveOut vectors from the Exposed and Defined vectors using the data flow equations. |
void |
findReach()
Finds and sets the Reach vectors from the Def and Kill vectors using the data flow equations. |
void |
findUsed()
Finds and sets the Used vectors for the entire flow. |
void |
findUsed(BBlock pBBlock)
Finds and sets the Used vector for the given BBlock. |
void |
findUseDef()
Find UseDef relations and DefUse relations without considering side effects of call and alias. |
protected void |
findUseDef(BBlock pBBlock,
boolean pExhaustive)
findUseDef Compute both DefUse relations and UseDef relations for pBBlock. |
void |
findUseDefExhaustively()
Find UseDef relations and DefUse relations considering side effects of call and alias. |
java.util.List |
getBBlockList()
Returns the List of BBlocks in the flow. |
int |
getDefCount()
getDefCount |
int |
getDefIndex(int NodeIndex)
getDefIndex |
int |
getDefNodeIndex(int pDefSetRefReprNo)
getNodeIndex |
FlowAnalSym |
getFlowAnalSym(int ExpIndex)
getExpId |
int |
getFlowAnalSymCount()
// getExpIdCount getFlowAnalSymCount |
IR |
getNode(int pNodeIndex)
getNode(int) Returns the node that has the given index. |
IR |
getNodeFromDefIndex(int pDefIndex)
Returns the IR node that corresponds to the given DefSetRefRepr index (entry of the DefVector). |
int |
getPointCount()
getPointCount |
java.util.Set |
getUndefinedUseNodeOfSym(FlowAnalSym lSym)
|
java.util.Set |
getUseFlowAnalSyms(FlowAnalSym pFlowAnalSym)
Returns the Set of ExpIds that are contained in the given ExpId and are used. |
java.util.Set |
getUseFlowAnalSyms(IR pSubtree)
!! |
java.util.Set |
getUseFlowAnalSymsForHir(HIR pSubtree)
|
protected void |
handleCall(IR pCallNode,
SubpFlow pSubpFlow,
java.util.Set pDDefSyms,
ListValuedMap pSymToPDefNode)
findUseDefObsolete Compute both DefUse relations and UseDef relations for pBBlock. |
protected void |
initiateDataFlow()
|
protected void |
recordExpId()
allocateExpId Creates a table that retrieves ExpId from its index value. |
(パッケージプライベート) void |
recordSetRefReprs()
Records the SetRefReprs each BBlock contains. |
void |
showAll()
Shows all the information found in this DFA. |
void |
showAllBitVectors()
Shows all the BitVectors. |
void |
showAvailIn()
Shows the AvailIn vector for every BBlock. |
void |
showAvailInAvailOutRelated()
Shows BitVectors related to (needed to solve) AvailIn/AvailOut vectors, that is, EGen, EKill, AvailIn, and AvailOut vectors. |
void |
showAvailOut()
Shows the AvailOut vector for every BBlock. |
void |
showBasic()
Shows all the data flow items that are independent of the control flow, that is, Def, Kill, Defined, Exposed, EGen, and EKill vectors. |
void |
showDef()
Shows the Def vector for every BBlock. |
void |
showDefIn()
Shows the DefIn vector for every BBlock. |
void |
showDefInDefOutRelated()
Shows BitVectors related to (needed to solve) DefIn/DefOut vectors, that is, Defined, DefIn, and DefOut vectors. |
void |
showDefined()
Shows the Defined vector for every BBlock. |
void |
showDefOut()
Shows the DefOut vector for every BBlock. |
void |
showDefUse()
Shows the DefUseList for each FlowAnalSym. |
void |
showDefVectors()
Shows all the DefVectors for all the BBlocks. |
void |
showEGen()
Shows the EGen vector for every BBlock. |
void |
showEKill()
Shows the EKill vector for every BBlock. |
void |
showExposed()
Shows the Exposed vector for every BBlock. |
void |
showExpVectors()
Shows all the ExpVectors for all the BBlocks. |
void |
showKill()
Shows the Kill vector for every BBlock. |
void |
showLiveIn()
Shows the LiveIn vector for every BBlock. |
void |
showLiveInLiveOutRelated()
Shows BitVectors related to (needed to solve) LiveIn/LiveOut vectors, that is, Exposed, Defined, LiveIn, and LiveOut vectors. |
void |
showLiveOut()
Shows the LiveOut vector for every BBlock. |
void |
showReach()
Shows the Reach vector for every BBlock. |
void |
showReachRelated()
Shows BitVectors related to (needed to solve) Reach vectors, that is, Def, Kill, and Reach vectors. |
void |
showSolved()
Shows all the data flow items data flow equations have found, that is, In, Out, Reach, AvailIn, AvailOut, LiveIn, LiveOut, DefIn, and DefOut vectors. |
void |
showSummary()
Show summary of data flow information. |
void |
showUseDef()
Shows the UseDefList for each FlowAnalSym. |
(パッケージプライベート) void |
showVector(BitVector pBitVector)
Shows the given BitVector. |
(パッケージプライベート) void |
showVector(BitVector pBitVector,
java.lang.String pComment)
Shows the given BitVector w/ a comment(heading). |
void |
solveAll()
Solves all the data flow equations to find In, Out, Reach, AvailIn, AvailOut, LiveIn, LiveOut, DefIn, and DefOut vectors. |
(パッケージプライベート) ExpVector |
toExpVector(java.util.Set pSymbolSet)
toExpVector Converts the given Set of symbols to an ExpVector where each bit of the vector corresponds to an element in the Set set. |
(パッケージプライベート) java.util.Set |
toSet(ExpVector pExpVector)
Converts the given ExpVector to a Set that has elements that correspond to the set bits of the ExpVector. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
public final FlowRoot flowRoot
public final IoRoot ioRoot
public final SymRoot symRoot
public final HirRoot hirRoot
public final Flow flow
public ShowDataFlowByName showDataFlowByName
protected SubpFlow fSubpFlow
protected ShowDataFlow fShowDataFlow
protected int fDefCount
protected DefVector DEF_ZERO
protected DefVector DEF_INVERTED
protected ExpVector EXP_ZERO
protected ExpVector EXP_INVERTED
protected int[] fDefNodeIndexTable
protected FlowAnalSym[] fFlowAnalSymTable
protected java.util.Set[] fUndefinedUseNodesOfSym
protected RecordAlias fRecordAlias
public final int fDbgFlow
| コンストラクタの詳細 |
public DataFlowImpl(FlowRoot pFlowRoot,
SubpFlow pSubpFlow)
public DataFlowImpl()
| メソッドの詳細 |
protected void initiateDataFlow()
void recordSetRefReprs()
public java.util.List getBBlockList()
DataFlow 内の getBBlockListprotected void recordExpId()
public int getDefCount()
DataFlow 内の getDefCountpublic int getFlowAnalSymCount()
DataFlow 内の getFlowAnalSymCountpublic int getPointCount()
DataFlow 内の getPointCountpublic FlowAnalSym getFlowAnalSym(int ExpIndex)
DataFlow 内の getFlowAnalSympublic int getDefIndex(int NodeIndex)
DataFlow 内の getDefIndexpublic int getDefNodeIndex(int pDefSetRefReprNo)
DataFlow 内の getDefNodeIndexpDefSetRefReprNo - index of value-setting SetRefRepr.
public IR getNode(int pNodeIndex)
DataFlow 内の getNodepNodeIndex - index of the node to be gotten.
public IR getNodeFromDefIndex(int pDefIndex)
DataFlow 内の getNodeFromDefIndexprotected void allocateSpace()
public void findDef()
DataFlow 内の findDefpublic void findDef(BBlock pBBlock)
DataFlow 内の findDefpBBlock - BBlock whose Def vector to find.public void findKill()
DataFlow 内の findKillpublic void findKill(BBlock pBBlock)
DataFlow 内の findKillpBBlock - BBlock whose Kill vector to find.
See #findDefined()public void findDefined()
DataFlow 内の findDefinedpublic void findDefined(BBlock pBBlock)
DataFlow 内の findDefinedpBBlock - BBlock whose Defined vector to find.public void findUsed()
DataFlow 内の findUsedpublic void findUsed(BBlock pBBlock)
DataFlow 内の findUsedpBBlock - BBlock whose Used vector to find.public void findExposed()
DataFlow 内の findExposedpublic void findExposed(BBlock pBBlock)
DataFlow 内の findExposedpBBlock - BBlock whose Exposed vector to find.public void findEGen()
DataFlow 内の findEGen
protected void addEGenExpId(java.util.Set pEGenSet,
java.util.Set pEKillSet,
SetRefRepr pSetRefRepr)
pEGenSet - accumulated set of EGen ExpIds in the current BBlock.pEKillSet - accumulated set of EKill ExpIds in the current BBlock.pSetRefRepr - SetRefRepr of an expression.public void findEGen(BBlock pBBlock)
DataFlow 内の findEGenpBBlock - BBlock whose EGen vector to find.public void findEKill()
DataFlow 内の findEKillpublic void findEKill(BBlock pBBlock)
DataFlow 内の findEKillpBBlock - BBlock whose EGen vector to be found.public void findReach()
DataFlow 内の findReachpublic void findAvailInAvailOut()
DataFlow 内の findAvailInAvailOutpublic void findLiveInLiveOut()
DataFlow 内の findLiveInLiveOutpublic void findDefInDefOut()
DataFlow 内の findDefInDefOutpublic int defLookup(int pNodeIndex)
DataFlow 内の defLookuppNodeIndex - index of the value-setting node (AssignStmt in HIR).public int defReverseLookup(int pBitPosition)
DataFlow 内の defReverseLookuppBitPosition - index in the DefVector for which to find the node index.public int expLookup(int pExpIdIndex)
DataFlow 内の expLookuppExpIdIndex - index of ExpId.public int expReverseLookup(int pBitPosition)
DataFlow 内の expReverseLookuppBitPosition - position in the ExpVector.public java.util.Set getUseFlowAnalSyms(IR pSubtree)
DataFlow 内の getUseFlowAnalSymspSubtree - IR node that is the root of the subtree to examine.
public java.util.Set getUseFlowAnalSymsForHir(HIR pSubtree)
DataFlow 内の getUseFlowAnalSymsForHirpublic java.util.Set getUseFlowAnalSyms(FlowAnalSym pFlowAnalSym)
public void clean()
public void findBasic()
DataFlow 内の findBasicDataFlow.findDef(),
DataFlow.findDefined(),
DataFlow.findKill(),
DataFlow.findExposed(),
DataFlow.findEGen(),
DataFlow.findEKill()public void solveAll()
DataFlow 内の solveAllDataFlow.findReach(),
DataFlow.findAvailInAvailOut(),
DataFlow.findLiveInLiveOut(),
DataFlow.findDefInDefOut()public void findAllBitVectors()
DataFlow 内の findAllBitVectorsDataFlow.findBasic(),
DataFlow.solveAll()public void findDefUse()
DataFlow 内の findDefUsepublic void findDefUseExhaustively()
DataFlow 内の findDefUseExhaustivelypublic void findUseDef()
DataFlow 内の findUseDefpublic void findUseDefExhaustively()
DataFlow 内の findUseDefExhaustively
protected void findUseDef(BBlock pBBlock,
boolean pExhaustive)
pBBlock -
protected void handleCall(IR pCallNode,
SubpFlow pSubpFlow,
java.util.Set pDDefSyms,
ListValuedMap pSymToPDefNode)
protected java.util.Set callModSyms(IR pCallNode,
SubpFlow pCurrentSubpFlow)
public void findAll()
DataFlow 内の findAllDataFlow.findAllBitVectors(),
DataFlow.findDefUse()public void showDef()
DataFlow 内の showDefpublic void showKill()
DataFlow 内の showKillpublic void showReach()
DataFlow 内の showReachpublic void showDefined()
DataFlow 内の showDefinedpublic void showExposed()
DataFlow 内の showExposedpublic void showEGen()
DataFlow 内の showEGenpublic void showEKill()
DataFlow 内の showEKillpublic void showAvailIn()
DataFlow 内の showAvailInpublic void showAvailOut()
DataFlow 内の showAvailOutpublic void showLiveIn()
DataFlow 内の showLiveInpublic void showLiveOut()
DataFlow 内の showLiveOutpublic void showDefIn()
DataFlow 内の showDefInpublic void showDefOut()
DataFlow 内の showDefOutpublic void showDefVectors()
DataFlow 内の showDefVectorsDataFlow.showDef(),
//@see #showIn()
//@see #showOut(),
DataFlow.showReach()public void showExpVectors()
DataFlow 内の showExpVectorsDataFlow.showDefined(),
DataFlow.showExposed(),
DataFlow.showEGen(),
DataFlow.showEKill(),
DataFlow.showAvailIn(),
DataFlow.showAvailOut(),
DataFlow.showLiveIn(),
DataFlow.showLiveOut(),
DataFlow.showDefIn(),
DataFlow.showDefOut()public void showBasic()
DataFlow 内の showBasicDataFlow.showDef(),
DataFlow.showKill(),
DataFlow.showDefined(),
DataFlow.showExposed(),
DataFlow.showEGen(),
DataFlow.showEKill()public void showSolved()
DataFlow 内の showSolvedDataFlow.showReach(),
DataFlow.showAvailIn(),
DataFlow.showAvailOut(),
DataFlow.showLiveIn(),
DataFlow.showLiveOut(),
DataFlow.showDefIn(),
DataFlow.showDefOut()public void showReachRelated()
DataFlow 内の showReachRelatedDataFlow.showDef(),
DataFlow.showKill(),
DataFlow.showReach()public void showAvailInAvailOutRelated()
DataFlow 内の showAvailInAvailOutRelatedDataFlow.showEGen(),
DataFlow.showEKill(),
DataFlow.showAvailIn(),
DataFlow.showAvailOut()public void showLiveInLiveOutRelated()
DataFlow 内の showLiveInLiveOutRelatedDataFlow.showExposed(),
DataFlow.showDefined(),
DataFlow.showLiveIn(),
DataFlow.showLiveOut()public void showDefInDefOutRelated()
DataFlow 内の showDefInDefOutRelatedDataFlow.showDefined(),
DataFlow.showDefIn(),
DataFlow.showDefOut()public void showAllBitVectors()
DataFlow 内の showAllBitVectorsDataFlow.showDefVectors(),
DataFlow.showExpVectors()public void showDefUse()
DataFlow 内の showDefUsepublic void showUseDef()
DataFlow 内の showUseDefpublic void showAll()
DataFlow 内の showAllDataFlow.showAllBitVectors(),
DataFlow.showDefUse()public void showSummary()
DataFlow の記述:
DataFlow 内の showSummaryvoid showVector(BitVector pBitVector)
pBitVector - BitVector to display
See ShowDataFlow#showVector()
void showVector(BitVector pBitVector,
java.lang.String pComment)
pBitVector - BitVector to displaypComment - Comment that is displayed before the BitVector
See ShowDataFlow#showVector()public java.util.Set getUndefinedUseNodeOfSym(FlowAnalSym lSym)
DataFlow 内の getUndefinedUseNodeOfSymExpVector toExpVector(java.util.Set pSymbolSet)
java.util.Set toSet(ExpVector pExpVector)
pExpVector - ExpVector to convert.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||