coins.flow
インタフェース SubpFlow

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

public interface SubpFlow

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.
 

フィールドの詳細

CF_INDEXED

public static final int CF_INDEXED
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

CF_BBLOCK

public static final int CF_BBLOCK
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

CF_CFG

public static final int CF_CFG
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

CF_DOMINATOR

public static final int CF_DOMINATOR
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

CF_POSTDOMINATOR

public static final int CF_POSTDOMINATOR
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_MIN

public static final int DF_MIN
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_EXPID

public static final int DF_EXPID
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_SETREFREPR

public static final int DF_SETREFREPR
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEF

public static final int DF_DEF
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_KILL

public static final int DF_KILL
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_REACH

public static final int DF_REACH
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFINED

public static final int DF_DEFINED
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_USED

public static final int DF_USED
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_EXPOSED

public static final int DF_EXPOSED
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_EGEN

public static final int DF_EGEN
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_EKILL

public static final int DF_EKILL
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_AVAILIN

public static final int DF_AVAILIN
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_AVAILOUT

public static final int DF_AVAILOUT
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_LIVEIN

public static final int DF_LIVEIN
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_LIVEOUT

public static final int DF_LIVEOUT
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFIN

public static final int DF_DEFIN
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFOUT

public static final int DF_DEFOUT
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFUSE

public static final int DF_DEFUSE
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFUSELIST

public static final int DF_DEFUSELIST
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_USEDEFLIST

public static final int DF_USEDEFLIST
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_DEFUSEEXHAUST

public static final int DF_DEFUSEEXHAUST
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_USEDEFEXHAUST

public static final int DF_USEDEFEXHAUST
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_TRSNSPARENT

public static final int DF_TRSNSPARENT
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

DF_MAX

public static final int DF_MAX
Item index used in calling methods isComputed, setComputedFlag. Item numbers should be in ascending order of computation so that resetComputedFlag(i) may reset all items greater or equal to i. fComputedFlag[i] = 0: Item i is not yet computed. fComputedFlag[i] = 1: Item i is under computation fComputedFlag[i] = i: Item i is already computed.

関連項目:
定数フィールド値

FLAG_EXPID_LHS

public static final int FLAG_EXPID_LHS
関連項目:
定数フィールド値
メソッドの詳細

getEntryBBlock

public BBlock getEntryBBlock()
Get the entry basic block. The entry BBlock is started by a statement having entry label (sually has block number 1.

戻り値:
the entry BBlock

setEntryBBlock

public void setEntryBBlock(BBlock pBlock)

getExitBBlock

public BBlock getExitBBlock()

setExitBBlock

public void setExitBBlock(BBlock pBlock)

copyFlowAnalData

public void copyFlowAnalData(SubpFlow pSubpFlow)

bblock

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


bblock

public BBlock bblock()
Create dummy basic block. (see linkHirWithFlowForSubp)


expVector

public ExpVector expVector()

pointVector

public PointVector pointVector()

defVector

public DefVector defVector()

flowAnalSymVector

public FlowAnalSymVector flowAnalSymVector()

resetFlowSymLinkForRecordedSym

public void resetFlowSymLinkForRecordedSym()
linkLirWithDataFlowForSubp Reset links between flow information and LIR nodes, symbols, etc. Set index to each LIR node in the subprogram under analysis. Assign index number to symbols actually used in the current subprogram. Create basic blocks and make link between BBlock and LIR node and create FlowIrLink table showing the link to LIR node.


resetFlowSymLink

public void resetFlowSymLink(SymTable pSymTable)
resetFlowSymLink Reset all flow analysis information of symbols in pSymTable and its descendents. Symbols to be reset are those ones that are recorded as accessed symbols (getAccessedSyms()) in a subprogram, and so, this method is effective to reset the effect of previous flow analysis for a subprogram. For global symbols, use resetGlobalFlowSymLink().


resetGlobalFlowSymLink

public void resetGlobalFlowSymLink()
resetGlobalFlowSymLink Reset all flow analysis information of symbols that are contained in ancestor symbol table (symTableRoot, etc) without traversing its descendents.


getBBlock

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

パラメータ:
pBlockNumber - block number of the basic block to be got.
戻り値:
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,
                         int pBlockNumber)

getIndexedSym

public FlowAnalSym getIndexedSym(int pSymIndex)

getIndexedNode

public IR getIndexedNode(int pNodeIndex)

getBBlockFromNodeIndex

public BBlock getBBlockFromNodeIndex(int pNodeIndex)

getNumberOfBBlocks

public int getNumberOfBBlocks()

getNumberOfNodes

public int getNumberOfNodes()

setNumberOfNodes

public void setNumberOfNodes(int pCount)

getSymExpCount

public int getSymExpCount()

getUsedSymCount

public int getUsedSymCount()

generateExpIdName

public java.lang.String generateExpIdName()
generateExpIdName Generate a name of expression identifier _xId1, _xId2, _xId3, ... using SymExpCount as trailing index. If a symbol having the name is not found in symTableCurrent, then it is returned, else if the name is ExpId, then it is reused after calling resetFlowAnalInf(). If the symbol other than ExpId is found, then SymExpCount is incremented and new name is generated. The SymExpCount is incremented when a new name is generated.

戻り値:
the name with SymExpCount as the trailing index.

initiateControlFlowAnal

public void initiateControlFlowAnal(SubpDefinition pSubpDefinition,
                                    int pIndexMin,
                                    int pIndexMax)

initiateDataFlowAnal

public void initiateDataFlowAnal(SubpDefinition pSubpDefinition)
initiateDataFlowAnal Initiate bit vectors, and initiate fields in SetRefRepls, etc.

パラメータ:
pSubpDefinition - definition of subprogram to be analyzed.

getSubpDefinition

public SubpDefinition getSubpDefinition()

getSubpSym

public Subp getSubpSym()

getNumberOfDefUsedGlobalSymbols

public int getNumberOfDefUsedGlobalSymbols()

getPointVectorBitCount

public int getPointVectorBitCount()

setPointVectorBitCount

public void setPointVectorBitCount(int pBitCount)

getPointVectorWordCount

public int getPointVectorWordCount()

getExpVectorBitCount

public int getExpVectorBitCount()

setExpVectorBitCount

public void setExpVectorBitCount(int pBitCount)

getExpVectorWordCount

public int getExpVectorWordCount()

getDefVectorBitCount

public int getDefVectorBitCount()

setDefVectorBitCount

public void setDefVectorBitCount(int pBitCount)

getDefVectorWordCount

public int getDefVectorWordCount()

getBBlockVectorBitCount

public int getBBlockVectorBitCount()

setBBlockVectorBitCount

public void setBBlockVectorBitCount(int pBitCount)

getBBlockVectorWordCount

public int getBBlockVectorWordCount()

getRefPoint

public IR getRefPoint(int pIndex)
Get IR node from ref-index

パラメータ:
pIndex - ref index (fSubpFlow.fDefRefIndex[nodeIndex])
戻り値:
the corresponding node.

getDefPoint

public IR getDefPoint(int pIndex)
Get IR node from def-index. Def-point is AssignStmt node.

パラメータ:
pIndex - def index (fSubpFlow.fDefIndex[nodeIndex])
戻り値:
the corresponding node.

getDefIndex

public int getDefIndex(int pNodeIndex)
Get def-index from node index.

パラメータ:
pNodeIndex - IR node index.
戻り値:
def-index

recordDefRefPoint

public int recordDefRefPoint(IR pIR)

recordDefPoint

public int recordDefPoint(IR pIR)

getAssignCount

public int getAssignCount()

getCallCount

public int getCallCount()

setPrevBBlockInSearch

public void setPrevBBlockInSearch(BBlock pPrev)
setPrevBBlockInSearch getPrevBBlockInSearch Methods used in linking basic blocks in depth first order, etc.

パラメータ:
pPrev - previous BBlock from which this BBlock is to be linked.

getPrevBBlockInSearch

public BBlock getPrevBBlockInSearch()

getDefinedSyms

public java.util.Set getDefinedSyms()
getDefinedSyms Set of all symbols whose value is set in this subprogram.


getUsedSyms

public java.util.Set getUsedSyms()
getUsed Set of all symbols whose value is used in this subprogram.


summarize

public 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.


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().


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. IR tree should not be changed after instanciation of BBlockSubtreeIteratorImpl until all invocations of hasNext() and next() are finished. Traversed top-subtrees are LabeledStmt, AssignStmt, ExpStmt, ReturnStmt, IfStmt, LoopStmt, SwitchStmt Conditional expression in IfStmt and LoopStmt Case-selection expression in SwitchStmt Call subtree (irrespective of contained in ExpStmt or Exp)


bblockStmtIterator

public BBlockStmtIterator bblockStmtIterator(BBlockHir pBBlock)
bblockStmtIterator get iterator to traverse statements in the basic block pBBlock. IR tree should not be changed after instanciation of BBlockStmtIteratorImpl until all invocations of hasNext() and next() are finished.


bblockNodeIterator

public 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. If the basic block containes a list of subtrees, then the list is traversed from head to tail traversing each subtree.


pointVectorIterator

public PointVectorIterator pointVectorIterator(PointVector pPointVector)

defVectorIterator

public DefVectorIterator defVectorIterator(DefVector pDefVector)

expVectorIterator

public ExpVectorIterator expVectorIterator(ExpVector pExpVector)

getFlowAnalStateLevel

public int getFlowAnalStateLevel()

setFlowAnalStateLevel

public void setFlowAnalStateLevel(int pState)

getBBlockList

public java.util.List getBBlockList()
Returns the List of BBlocks in the flow excluding null and 0-numbered BBlock. (Moved from DataFlowImpl.) //##63

戻り値:
the List of BBlocks in the flow.

getBBlockTable

public java.util.ArrayList getBBlockTable()
Get BBlockTable of this subprogram. Use getBBlockList() instead of this method.

戻り値:
BBlockTable

getReachableBBlocks

public java.util.List getReachableBBlocks()
Get list of BBlocks reachable from entry BBLock.

戻り値:
teh list of reachable BBlocks.

getBBlock

public BBlock getBBlock(HIR pHIR)

getBBlockOfIR

public BBlock getBBlockOfIR(int pIndex)

getBBlockForLabel

public BBlock getBBlockForLabel(Label pLabel)

setBBlock

public void setBBlock(HIR pHir,
                      BBlock pBBlock)

setBBlock

public void setBBlock(Label pLabel,
                      BBlock pBBlock)

getLinkedSubtreeOfExpId

public HIR getLinkedSubtreeOfExpId(ExpId pExpId)

getDefUseList

public DefUseList getDefUseList()

getDefUseExhaustiveList

public DefUseList getDefUseExhaustiveList()

getDefNodeList

public java.util.List getDefNodeList(FlowAnalSym pSym)

getUseDefList

public UseDefList getUseDefList()

getUseDefExhaustiveList

public UseDefList getUseDefExhaustiveList()

geUseNodeList

public java.util.List geUseNodeList(FlowAnalSym pSym)

getIrIndexMin

public int getIrIndexMin()

getIrIndexMax

public int getIrIndexMax()

getDefCount

public int getDefCount()

getExpId

public ExpId getExpId(IR pIr)

getExpId

public ExpId getExpId(IR pIr,
                      int pIndex)

setExpId

public void setExpId(IR pIr,
                     ExpId pFlowExpId)

getExpIdList

public java.util.List getExpIdList()

printExpIdAndIrCorrespondence

public void printExpIdAndIrCorrespondence()

clearControlFlow

public void clearControlFlow()
Clear all control/data flow analysis information.


clearDataFlow

public void clearDataFlow()
Clear data flow information. Before calling clearDataFlow, clearControlFlow should be called. clearDataFlow may be called after CFG creation (after flow.controlFlowAnal(SubpFlow)) in which case, CFG information is not cleared.


resetControlAndDataFlowInformation

public void resetControlAndDataFlowInformation()
Clear all control/data flow analysis information after executing setIndexNumberTOAllNodes.


computeSetOfGlobalVariables

public java.util.Set computeSetOfGlobalVariables()

computeSetOfAddressTakenVariables

public java.util.Set computeSetOfAddressTakenVariables()

computeBBlockSetRefReprs

public void computeBBlockSetRefReprs()

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.

getSetRefReprList

public SetRefReprList getSetRefReprList(BBlock pBBlock)

setSetRefReprList

public void setSetRefReprList(BBlock pBBlock,
                              SetRefReprList pSetRefReprList)

subtreesContainingCall

public java.util.Set subtreesContainingCall()

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.

getBBlock0

public BBlock getBBlock0(Label pLabel)

getSetRefReprOfIR

public SetRefRepr getSetRefReprOfIR(IR pIR)

setSetRefReprOfIR

public void setSetRefReprOfIR(SetRefRepr pSetRefRepr,
                              IR pIR)

getListOfBBlocksFromEntry

public java.util.List getListOfBBlocksFromEntry()

getListOfBBlocksFromExit

public java.util.List getListOfBBlocksFromExit()

getFlowRoot

public FlowRoot getFlowRoot()

isFailed

public boolean isFailed()

isComputed

public boolean isComputed(int pItemIndex)
Test if a control/data flow item is already computed or not. Control flow items are reset by initiateControlFlowAnal, data flow items are reset by initiateDataFlowAnal of SubpFlow.

パラメータ:
pItemIndex - item index CF_INDEXED .. DF_DEFUSELIST.
戻り値:
true if the item specified by pItemIndex is already computed.

setComputedFlag

public void setComputedFlag(int pItemIndex)
Set the control/data flow item to be computed as true. The result can be seen by isComputed.

パラメータ:
pItemIndex - item index CF_INDEXED .. DF_DEFUSELIST.

setUnderComputation

public void setUnderComputation(int pItemIndex)
Set computed flag for the item indicated by pItemIndex.

パラメータ:
pItemIndex -

resetComputedFlag

public void resetComputedFlag(int pItemIndex)
Reset computed flag for all items whose item numbers are greater or equal to pItemIndex.

パラメータ:
pItemIndex -

isComputedOrUnderComputation

public boolean isComputedOrUnderComputation(int pItemIndex)

getComplexityLevel

public int getComplexityLevel()
Get the complexity level of this subprogram. 1: simple. Do full analysis. 2: medium. Alias analysis is simplified. 3: complex. Alias analysis and data flow analysis are simplified.

戻り値:
the complexity level.

hasCall

public boolean hasCall()

hasCallUnder

public boolean hasCallUnder(IR pIR)
Returns true if the given IR node has as its decendant a call node.


getFlowAdapter

public FlowAdapter getFlowAdapter()

changeListOfFlowBBlocksToListOfAflowBBlocks

public java.util.List changeListOfFlowBBlocksToListOfAflowBBlocks(java.util.List pListOfFlowBBlocks)

getMaximalCompoundVars

public java.util.Set getMaximalCompoundVars()
Get the set of maximal compound variables. A maximal compound variable is either subscripted variable, maximal struct/union element whose parent is not QuarifiedExp, maximal pointer qualification whose parent is not PpointedExp. This set is computed when ExpIds are allocated.

戻り値:
the set of maximal compound variable expressions.

getFlowAnalSymTable

public FlowAnalSym[] getFlowAnalSymTable()

getDominators

public BBlockVector getDominators(BBlock pBBlock)
Get BBlockVector representing dominators of pBBlock. As for immediate dominators, see getImmediateDominator() of BBlock interface.

パラメータ:
pBBlock - Basic block.
戻り値:
BBlockVector representing dominators of pBBlock.

getPostDominators

public BBlockVector getPostDominators(BBlock pBBlock)
Get BBlockVector representing post dominators of pBBlock. As for immediate post dominators, see getImmediateDominator() of BBlock interface.

パラメータ:
pBBlock - Basic block.
戻り値:
BBlockVector representing post dominators of pBBlock.

getDominatorList

public java.util.List getDominatorList(BBlock pBBlock)
Get the list of dominators of pBBlock.

パラメータ:
pBBlock - Basic block.
戻り値:
the list representing dominators of pBBlock.

getPostDominatorList

public java.util.List getPostDominatorList(BBlock pBBlock)
Get the list of post dominators of pBBlock.

パラメータ:
pBBlock - Basic block.
戻り値:
the list representing post dominators of pBBlock.

sortExpIdCollection

public 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).

パラメータ:
pExpIdCollection - list or set of FlowAnalSyms.
戻り値:
the sorted list of FlowAnalSyms.