coins.aflow
インタフェース SubpFlow

既知のサブインタフェースの一覧:
HirSubpFlow
既知の実装クラスの一覧:
HirSubpFlowImpl, SubpFlowImpl

public interface SubpFlow

SubpFlow interface: Interface for subprogram flow analysis.


メソッドの概要
 void allocateExpIdTable()
           
 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.
 BBlockSubtreeIterator bblockSubtreeIterator(BBlock pBBlock)
          bblockSubtreeItrator Get iterator that traverse top subtrees of the basic block pBBlock.
 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 from the entry BBlock.
 void clear()
          Clear flow analysis information by resetting fIrIndexMin = 0, fIrIndexMax = 0, fSetOfGlobalSymbols, fSetOfAddressTakenSymbols.
 java.util.Set computeSetOfAddressTakenVariables()
           
 java.util.Set computeSetOfGlobalVariables()
           
 java.util.List controlFlowAnal()
          Performs the control flow analysis of this SubpFlow and makes a list of BBlocks.
 void correlateBBlockAndIR()
          correlateBBlockAndIR: Correlate BBlock and IR so that getBBlockOfIR(hir.getIndex()) become effective.
 DefVector defVector()
           
 ExpVector expVector()
           
 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 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 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 pSym)
          Returns the DefUseList for the given FlowAnalSym in this SubpFlow.
 BBlock getEntryBBlock()
           
 BBlock getExitBBlock()
           
 FlowExpId getExpId(IR pIr)
           
 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 pSym)
          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()
           
 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 pSym, DefUseList pList)
          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 pSym, UDList pList)
          Sets the UDList for the given FlowAnalSym in this SubpFlow.
 

メソッドの詳細

getEntryBBlock

public BBlock getEntryBBlock()

getExitBBlock

public BBlock getExitBBlock()

setEntryBBlock

public void setEntryBBlock(BBlock pBlock)

setExitBBlock

public void setExitBBlock(BBlock pBBlock)

bblock

public BBlock bblock(LabeledStmt pLabeledStmt)
Create new basic block corresponding to the HIR labeled statement pLabeledStmt.


bblockVector

public BBlockVector bblockVector()
Create new basic block corresponding to the LIR Prologue node pPrologue.


expVector

public ExpVector expVector()

pointVector

public PointVector pointVector()

defVector

public DefVector defVector()

flowAnalSymVector

public FlowAnalSymVector flowAnalSymVector()

getBBlock

public BBlock getBBlock(int pBlockNumber)
getBBlock: Get the basic block whose block number is pBlockNumber.

戻り値:
basic block that has pBlockNumber as its block number. If the BBlock having pBlocknumber is deleted (has IS_DELETED flag) then return null.

recordBBlock

public void recordBBlock(BBlock pBlock)

getNumberOfBBlocks

public int getNumberOfBBlocks()

getSubpDefinition

public SubpDefinition getSubpDefinition()

getSubpSym

public Subp getSubpSym()

cfgIterator

public java.util.Iterator cfgIterator()
cfgIterator: Traverse basic blocks in CFG (control flow graph) in depth first order from the entry BBlock. Available methods: next(), hasNext().


cfgFromExitIterator

public java.util.Iterator cfgFromExitIterator()
cfgFromExitIterator: Traverse basic blocks in CFG (control flow graph) in inverse depth first order from the exit BBlock. Available methods: next(), hasNext().


cfgBfoIterator

public java.util.Iterator cfgBfoIterator()

bblockSubtreeIterator

public BBlockSubtreeIterator bblockSubtreeIterator(BBlock pBBlock)
bblockSubtreeItrator Get iterator that traverse top subtrees of the basic block pBBlock. For HIR, all top subtrees are to be traversed. For LIR, all LIRTrees are to be traversed.


getBBlockTable

public FAList getBBlockTable()
List of BBlock object that this SubpFlow has ever recorded. Deleted (unreachable, redundant) BBlocks are included.


getBBlocks

public java.util.List getBBlocks()
Same as { #getReachableBBlocks()}.


setBBlocks

public void setBBlocks(java.util.List pBBlocks)
Same as { #setReachableBBlocks()}.


getReachableBBlocks

public java.util.List getReachableBBlocks()
Returns a list of BBlocks that are reachable from the entry BBlock. Usually this is the set of BBlocks to consider.


setReachableBBlocks

public void setReachableBBlocks(java.util.List pBBlocks)
Sets a list of BBlocks that are reachable from the entry BBlock. Usually this is the set of BBlocks to consider.


getBBlocksFromEntry

public java.util.List getBBlocksFromEntry()
Returns the list of BBlocks in the breadth first order beginning from the entry bblock.


getBBlocksFromExit

public java.util.List getBBlocksFromExit()
Returns the list of BBlocks in the breadth first order beginning from the exit bblock and traversing backward.


getNumberOfRelevantBBlocks

public int getNumberOfRelevantBBlocks()
Number of reachable BBlocks.


getFlowExpIdTable

public FAList getFlowExpIdTable()
Returns the FlowExpId table (index number and its associated FlowExpId) for this SubpFlow.


setFlowExpIdTable

public void setFlowExpIdTable(FAList pFlowExpIdTable)
Sets the FlowExpId table (index number and its associated FlowExpId) for this SubpFlow.


results

public FlowResults results()

assigner

public AssignFlowExpId assigner()
Retuns the AssignFlowExpId object this SubpFlow is associated with. The AssignFlowExpId object knows which FlowExpId to issue next.


getSetRefReprs

public FAList getSetRefReprs()
Returns the list of SetRefRepr objects within this SubpFlow.


setSetRefReprs

public void setSetRefReprs(FAList pSetReprs)
Sets the list of SetRefRepr objects within this SubpFlow.


controlFlowAnal

public java.util.List controlFlowAnal()
Performs the control flow analysis of this SubpFlow and makes a list of BBlocks.

戻り値:
list of BBlocks that are reachable.

getDefUseList

public DefUseList getDefUseList(FlowAnalSym pSym)
Returns the DefUseList for the given FlowAnalSym in this SubpFlow.


setDefUseList

public void setDefUseList(FlowAnalSym pSym,
                          DefUseList pList)
Sets the DefUseList for the given FlowAnalSym in this SubpFlow.


getUDList

public UDList getUDList(FlowAnalSym pSym)
Returns the UDList for the given FlowAnalSym in this SubpFlow.


setUDList

public void setUDList(FlowAnalSym pSym,
                      UDList pList)
Sets the UDList for the given FlowAnalSym in this SubpFlow.


getSymIndexTable

public FAList getSymIndexTable()
Returns the table of symbols possibly accessed in this SubpFlow. Globol symbols are always included.


setSymIndexTable

public void setSymIndexTable(FAList pSymIndexTable)
Sets the table of symbols possibly accessed in this SubpFlow.


makeDominatorTree

public void makeDominatorTree()
Makes the dominator tree.


makePostdominatorTree

public void makePostdominatorTree()
Makes the postdominator tree.


initiateDataFlow

public void initiateDataFlow()
Initiate data flow analysis. See subinterfaces for what is actually done.


findPDef

public void findPDef()
Finds the "PDef" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDDefined

public void findDDefined()
Finds the "DDefined" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPDefined

public void findPDefined()
Finds the "PDefined" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDKill

public void findDKill()
Finds the "DKill" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPKill

public void findPKill()
Finds the "PKill" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDExposedUsed

public void findDExposedUsed()
Finds the "DExpesed" and "PExposed" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPExposedUsed

public void findPExposedUsed()
Finds the "PExposed" and "PUsed" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDEGen

public void findDEGen()
Finds the "DEGen" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPEKill

public void findPEKill()
Finds the "PEKill" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDReach

public void findDReach()
Finds the "DReach" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPReach

public void findPReach()
Finds the "PReach" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDAvailInAvailOut

public void findDAvailInAvailOut()
Finds the "DAvailIn" and "DAvailOut" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findPLiveInLiveOut

public void findPLiveInLiveOut()
Finds the "PLiveIn" and "PLiveOut" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDDefInDefOut

public void findDDefInDefOut()
Finds the "DDefIn" and "DDefOut" vectors for all BBlocks contained in this SubpFlow. The control flow graph must already be created.


findDefUse

public void findDefUse()
Finds the DefUseLists for all the FlowAnalSyms that appear in this SubpFlow. The control flow graph must already be created.


findUseDef

public void findUseDef()
Finds the UDLists for all the FlowAnalSyms that appear in this SubpFlow. The control flow graph must already be created.


getSetRefReprOfIR

public SetRefRepr getSetRefReprOfIR(int pIndex)
Get SetRefRepr corresponding to the IR node indexed by pIndex. It is cleared by clear() of FlowResults.

戻り値:
SetRefRepr corresponding to the node; return null if no corresponding one.

setSetRefReprOfIR

public void setSetRefReprOfIR(SetRefRepr pSetRefRepr,
                              int pIndex)
Set SetRefRepr corresponding to the IR node indexed by pIndex. It is cleared by clear() of FlowResults.


getBBlockOfIR

public BBlock getBBlockOfIR(int pIndex)
Get BBlock corresponding to the IR node indexed by pIndex. It is cleared by clear() of FlowResults.

戻り値:
BBlock corresponding to the node; return null if no corresponding one.

setBBlockOfIR

public void setBBlockOfIR(BBlock pBBlock,
                          int pIndex)
Set BBlock corresponding to the IR node indexed by pIndex. It is cleared by clear() of FlowResults.


correlateBBlockAndIR

public void correlateBBlockAndIR()
correlateBBlockAndIR: Correlate BBlock and IR so that getBBlockOfIR(hir.getIndex()) become effective. Before calling this, controlFlowAnal() should be called. This may be skipped if setBBlockOfIR is called for each IR in some other processing for the subprogram corresponding to this SubpFlow.


getIrIndexMin

public int getIrIndexMin()

getIrIndexMax

public int getIrIndexMax()

allocateExpIdTable

public void allocateExpIdTable()

getExpId

public FlowExpId getExpId(IR pIr)

setExpId

public void setExpId(IR pIr,
                     FlowExpId pFlowExpId)

printExpIdTable

public void printExpIdTable()

clear

public void clear()
Clear flow analysis information by resetting fIrIndexMin = 0, fIrIndexMax = 0, fSetOfGlobalSymbols, fSetOfAddressTakenSymbols.


computeSetOfGlobalVariables

public java.util.Set computeSetOfGlobalVariables()

computeSetOfAddressTakenVariables

public java.util.Set computeSetOfAddressTakenVariables()

setOfGlobalVariables

public java.util.Set setOfGlobalVariables()

setOfAddressTakenVariables

public java.util.Set setOfAddressTakenVariables()

setRestructureFlag

public void setRestructureFlag()

getRestructureFlag

public boolean getRestructureFlag()

setRecordAlias

public void setRecordAlias(RecordAlias pRecordAlias)
Record a RecordAlias instance in order to indicate that alias is considered in data flow analysis. If pRecordAlias is not null, alias is considered. If pRecordAlias is null, alias is not considered.

パラメータ:
pRecordAlias - is an instance of RecordAlias keeping the the result of alias analysis for this subprogram.

getRecordAlias

public RecordAlias getRecordAlias()
If returned value is not null, then alias is considered in data flow analysis. If it is null, then alias is not considered. The returned value is used to get alias information for data flow analysis.

戻り値:
RecordAlias instance set by setRecordAlias method.

setExpOfTemp

public void setExpOfTemp(Var pTempVar,
                         Exp pExp)
Record pExp as the expression represented by the temporal variable pTempVar.

パラメータ:
pTempVar - variable introduced to represent an expression (in process of optimization, etc.).
pExp -

getExpOfTemp

public Exp getExpOfTemp(Var pTempVar)
Get the expression represented by the temporal variable pTempVar.

パラメータ:
pTempVar - variable introduced to represent an expression (in process of optimization, etc.).
戻り値:
the expression represented by the temporal variable.