|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.flow.BBlockImpl
| Fields inherited from interface coins.flow.BBlock |
HAS_CALL, HAS_JUMP, HAS_PTR_ASSIGN, HAS_STRUCT_UNION, IS_DELETED, IS_ENTRY, IS_EXIT, IS_MODIFIED, IS_RESTRUCTURED, LOOP_HEAD, LOOP_TAIL, UNDER_VISIT, USE_PTR, VISIT_OVER |
| Constructor Summary | |
BBlockImpl()
|
|
BBlockImpl(FlowRoot pFlowRoot,
int pBBlockNumber)
Create new basic block corresponding to the HIR labeled statement pLabeledStmt. |
|
| Method Summary | |
void |
addToPredList(BBlock pPred)
addToPredList addToSuccList Add the basic block pPred/pSucc to the list of predecessors/successors of this basic block, and this block is added to the list of successors/predecessors of pPred/pSucc. |
void |
addToSuccList(BBlock pSucc)
|
void |
allocateSpaceForDataFlowAnalysis(int pPointCount,
int pDefCount,
int pExpCount)
|
BBlockNodeIterator |
bblockNodeIterator()
bblockNodeIterator Create an iterator to traverse all HIR nodes in this basic block. |
BBlockSubtreeIterator |
bblockSubtreeIterator()
bblockSubtreeIterator Create an iterator to traverse all top-subtree in this basic block. |
HIR |
controlTransfer()
If this basic block ends with control transfer statement such as JUMP, RETURN, then this method returns the control transfer statement. |
void |
deleteFromPredList(BBlock pPred)
deleteFromPredList deleteFromSuccList Delete the basic block pPred/pSucc from to the list of predecessors/successors of this basic block, and this block is deleted from the list of successors/predecessors of pPred/pSucc. |
void |
deleteFromSuccList(BBlock pSucc)
|
BBlock |
getAflowBBlock()
|
ExpVector |
getAvailIn()
getAvailIn Get bit vector showing AvailIn set of this block. |
ExpVector |
getAvailInVector()
|
ExpVector |
getAvailOut()
getAvailOut Get bit vector showing AvailOut set of this block. |
ExpVector |
getAvailOutVector()
|
int |
getBBlockNumber()
|
int |
getBlockNumber()
getBlockNumber Get the block number attached to this basic block. |
DefVector |
getDef()
getDef Get bit vector showing Def set of this block. |
FlowAnalSymVector |
getDefIn()
getDefIn Get bit vector showing DefIn set of this block. |
FlowAnalSymVector |
getDefined()
getDefined Get bit vector showing Defined set of this block. |
FlowAnalSymVector |
getDefinedVector()
|
FlowAnalSymVector |
getDefInVector()
|
java.util.Set |
getDefNodes()
getDefNodes Get the set of nodes defining a value. |
FlowAnalSymVector |
getDefOut()
getDefOut Get bit vector showing DefOut set of this block. |
FlowAnalSymVector |
getDefOutVector()
|
DefVector |
getDefVector()
|
java.util.List |
getDominatedChildren()
getDominatedChildren Get the list of basic blocks immediately dominated by this block. |
ExpVector |
getEGen()
getEGen Get bit vector showing EGen set of this block. |
ExpVector |
getEGenVector()
|
ExpVector |
getEKill()
getEKill Get bit vector showing EKill set of this block. |
ExpVector |
getEKillAll()
getEKillAll Get bit vector showing EKillAll set of this block. |
ExpVector |
getEKillAllVector()
|
ExpVector |
getEKillVector()
|
FlowAnalSymVector |
getExposed()
getExposed Get bit vector showing Exposed set of this block. |
FlowAnalSymVector |
getExposedVector()
|
boolean |
getFlag(int pFlagNumber)
getFlag setFlag getFlag returns the value (true/false) of the flag indicated by pFlagNumber. |
BBlock |
getImmediateDominator()
getImmediateDominator Get a basic block immediately dominating this block. |
BBlock |
getImmediatePostDominator()
getImmediatePostDominator Get a basic block immediately post dominating this block. |
IR |
getIrLink()
getIrLink Get the top-subtree that starts this basic block. |
DefVector |
getKill()
getKill Get bit vector showing Kill set of this block. |
DefVector |
getKillVector()
|
Label |
getLabel()
getLabel Get a label attached to the first top-subtree of this basic block. |
FlowAnalSymVector |
getLiveIn()
getLiveIn Get bit vector showing LiveIn set of this block. |
FlowAnalSymVector |
getLiveInVector()
|
FlowAnalSymVector |
getLiveOut()
getLiveOut Get bit vector showing LiveOut set of this block. |
FlowAnalSymVector |
getLiveOutVector()
|
BBlock |
getNextInDFO()
getNextInDFO Get the next BBlock in depth first order. |
BBlock |
getNextInInverseDFO()
getNextInInverseDFO Get the next BBlock in inverse depth first order from exit BBlock. |
java.util.List |
getPostDominatedChildren()
getPostDominatedChildren Get the list of basic blocks immediately post dominated by this block. |
Edge |
getPredEdge(BBlock pFromBBlock)
getPredEdge Get the edge corresponding to the predecessor/successor to/from this basic block. |
java.util.List |
getPredList()
getPredList Get the predecessor list of this basic block. |
DefVector |
getReach()
getReach Get bit vector showing Reach set of this block. |
DefVector |
getReachVector()
|
SubpFlow |
getSubpFlow()
getUseNodes Get the set of nodes using value of variable or register. |
Edge |
getSuccEdge(BBlock pToBBlock)
getSuccEdge Get the edge corresponding to the predecessor/successor to/from this basic block. |
java.util.List |
getSuccList()
getSuccList Get the successor list of this basic block. |
FlowAnalSymVector |
getUsed()
getUsed Get bit vector showing Used set of this block. |
FlowAnalSymVector |
getUsedVector()
|
java.lang.Object |
getWork()
getWork setWork get/set information privately used in each phase. |
java.lang.Object |
getWorkFA()
getWorkFA setWorkFA get/set information privately used in flow analysis. |
protected void |
initiateFields()
|
boolean |
isAvailIn(ExpId pExpId)
isAvailIn See if the expression represented by pExpId is available (value is always computed) at entry to this block. |
boolean |
isAvailOut(ExpId pExpId)
isAvailOut See if the expression represented by pExpId is available (value is always computed) at exit from this block. |
boolean |
isDef(int pPos)
isDef See if definition at position pPos is done in this block. |
boolean |
isDefIn(Sym pSym)
isDefIn See if pSym is always defined at entry to this block whichever path may be take. |
boolean |
isDefined(Sym pSym)
isDefined See if the value of pSym is defined in this block. |
boolean |
isDefOut(Sym pSym)
isDefOut See if pSym is always defined at exit from this block. |
boolean |
isEGen(ExpId pExpId)
isEGen See if expression designated by pReg is generated (computed in this block and afterwards its operand is not changed) in this block. |
boolean |
isEKill(ExpId pExpId)
isEKill See if expression designated by pReg is killed (its operand is defined) in this block. |
boolean |
isEntryBlock()
isEntryBlock See if this block is the entry block in the graph of basic blocks. |
boolean |
isExitBlock()
isExitBlock See if this block is the exit block in the graph of basic blocks. |
boolean |
isExposed(Sym pSym)
isExposed See if the variable of pSym is used in this block without setting its value in this block. |
boolean |
isKill(int pPos)
isKill See if definition at position pPos is killed in this block. |
boolean |
isLiveIn(Sym pSym)
isLiveIn See if pSym is live at entry to this block (value at entry is used in this block or in some successor of this block). |
boolean |
isLiveOut(Sym pSym)
isLiveOut See if pSym is live at exit from this block (value at exit is used in some successor of this block). |
boolean |
isLoopBackEdge(BBlock pPredecessor)
isLoopBackEdge See if an edge is a loop back edge or not. |
boolean |
isReach(int pPos)
isReach See if definition at position pPos reaches to the entry point of this block. |
protected boolean |
isSymExpOn(ExpVector pVector,
Sym pSym)
isSymExpOn Return true/false according to 1/0 of pVector bit corresponding to pSym. |
boolean |
isUsed(Sym pSym)
isUsed See if the value of pSym is used in this block. |
void |
linkInDepthFirstOrder(Subp pSubp)
linkInDepthFirstOrder(Subp pSubp) Link basic blocks of subprogram pSubp in depth first order starting from the entry BBlock. |
void |
linkInInverseDepthFirstOrder(Subp pSubp)
linkInInverseDepthFirstOrder(Subp pSubp) Link basic blocks of subprogram pSubp in inverse depth first order starting from the exit BBlock. |
void |
printSubtrees()
printSubtrees Print the sequence of subtrees contained in this block. |
void |
resetForDataFlowAnal()
|
void |
setAflowBBlock(BBlock pBBlock)
|
void |
setAvailIn(ExpVector pVect)
|
void |
setAvailOut(ExpVector pVect)
|
void |
setDef(DefVector pVect)
|
void |
setDefIn(FlowAnalSymVector pVect)
|
void |
setDefined(FlowAnalSymVector pVect)
|
void |
setDefNodes(java.util.Set pSet)
|
void |
setDefOut(FlowAnalSymVector pVect)
|
void |
setDominatedChildren(java.util.LinkedList pDominatedChildren)
|
void |
setEGen(ExpVector pVect)
|
void |
setEKill(ExpVector pVect)
|
void |
setExposed(FlowAnalSymVector pVect)
|
void |
setFlag(int pFlagNumber,
boolean pYesNo)
|
void |
setImmediateDominator(BBlock pDominator)
|
void |
setImmediatePostDominator(BBlock pPostDominator)
|
void |
setIrLink(LabeledStmt pLabeledStmt)
setIrLink Set HIR statement pLabeledStmt or LIR DefLabel subtree as the first top-subtree that starts this basic block. |
void |
setKill(DefVector pVect)
|
void |
setLiveIn(FlowAnalSymVector pVect)
|
void |
setLiveOut(FlowAnalSymVector pVect)
|
void |
setNextInDFO(BBlock pNext)
setNextInDFO Record the next BBlock in depth first order. |
void |
setNextInInverseDFO(BBlock pNext)
|
void |
setPostDominatedChildren(java.util.LinkedList pPostDominatedChildren)
|
void |
setReach(DefVector pVect)
|
void |
setUsed(FlowAnalSymVector pVect)
|
void |
setWork(java.lang.Object pWork)
setWork get/set information privately used in each phase. |
void |
setWorkFA(java.lang.Object pWorkFA)
getWorkFA setWorkFA get/set information privately used in flow analysis. |
java.lang.String |
toString()
|
java.lang.String |
toStringDetail()
toStringDetail |
java.lang.String |
toStringShort()
toStringShort |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface coins.flow.BBlock |
getFirstSubtree, getLastSubtree |
| Field Detail |
public final FlowRoot flowRoot
public final SubpFlow subpFlow
protected int fBBlockNumber
protected IR fIrLink
protected java.util.LinkedList fPredList
protected java.util.LinkedList fSuccList
protected java.util.LinkedList fPredEdgeList
protected java.util.LinkedList fSuccEdgeList
protected BBlock fImmediateDominator
protected BBlock fImmediatePostDominator
protected java.util.LinkedList fDominatedChildren
protected java.util.LinkedList fPostDominatedChildren
protected BBlock fNextInDFO
protected BBlock fNextInInverseDFO
protected FlagBox fFlagBox
protected java.lang.Object fWork
protected java.lang.Object fWorkFA
protected java.util.HashMap fExpNodeListMap
protected DefVector fDef
protected DefVector fKill
protected DefVector fIn
protected DefVector fOut
protected DefVector fReach
protected ExpVector fEGen
protected ExpVector fEKill
protected ExpVector fEKillAll
protected ExpVector fAvailIn
protected ExpVector fAvailOut
protected FlowAnalSymVector fDefined
protected FlowAnalSymVector fExposed
protected FlowAnalSymVector fLiveIn
protected FlowAnalSymVector fLiveOut
protected FlowAnalSymVector fDefIn
protected FlowAnalSymVector fDefOut
protected FlowAnalSymVector fUsed
protected java.util.Set fDefNodes
public final int fDbgLevel
protected BBlock aflowBBlock
public HIR fControlTransfer
| Constructor Detail |
public BBlockImpl()
public BBlockImpl(FlowRoot pFlowRoot,
int pBBlockNumber)
| Method Detail |
protected void initiateFields()
public int getBlockNumber()
BBlock
getBlockNumber in interface BBlockpublic IR getIrLink()
BBlock
getIrLink in interface BBlockpublic void setIrLink(LabeledStmt pLabeledStmt)
BBlock
setIrLink in interface BBlockpublic Label getLabel()
BBlock
getLabel in interface BBlockpublic java.util.List getPredList()
BBlock
getPredList in interface BBlockpublic java.util.List getSuccList()
BBlock
getSuccList in interface BBlockpublic Edge getPredEdge(BBlock pFromBBlock)
BBlock
getPredEdge in interface BBlockpublic Edge getSuccEdge(BBlock pToBBlock)
BBlock
getSuccEdge in interface BBlockpublic boolean isEntryBlock()
isEntryBlock in interface BBlockpublic boolean isExitBlock()
isExitBlock in interface BBlockpublic boolean isLoopBackEdge(BBlock pPredecessor)
pPredecessor - basic block contained in a basic
block graph containing this block.
public BBlock getImmediateDominator()
getImmediateDominator in interface BBlockpublic void setImmediateDominator(BBlock pDominator)
setImmediateDominator in interface BBlockpublic java.util.List getDominatedChildren()
getDominatedChildren in interface BBlockpublic void setDominatedChildren(java.util.LinkedList pDominatedChildren)
setDominatedChildren in interface BBlockpublic BBlock getImmediatePostDominator()
getImmediatePostDominator in interface BBlockpublic void setImmediatePostDominator(BBlock pPostDominator)
setImmediatePostDominator in interface BBlockpublic java.util.List getPostDominatedChildren()
getPostDominatedChildren in interface BBlockpublic void setPostDominatedChildren(java.util.LinkedList pPostDominatedChildren)
setPostDominatedChildren in interface BBlockpublic BBlock getNextInDFO()
BBlock
getNextInDFO in interface BBlockpublic void setNextInDFO(BBlock pNext)
BBlock
setNextInDFO in interface BBlockpNext - Next BBlock in depth first order.
This method is called in linkInDepthFirstOrder.public BBlock getNextInInverseDFO()
BBlock
getNextInInverseDFO in interface BBlockpublic void setNextInInverseDFO(BBlock pNext)
setNextInInverseDFO in interface BBlockpublic void linkInDepthFirstOrder(Subp pSubp)
BBlock
linkInDepthFirstOrder in interface BBlockpublic void linkInInverseDepthFirstOrder(Subp pSubp)
BBlock
linkInInverseDepthFirstOrder in interface BBlockpublic java.lang.Object getWork()
BBlock
getWork in interface BBlockpublic void setWork(java.lang.Object pWork)
BBlock
setWork in interface BBlockpublic java.lang.Object getWorkFA()
BBlock
getWorkFA in interface BBlockpublic void setWorkFA(java.lang.Object pWorkFA)
BBlock
setWorkFA in interface BBlockpublic BBlockSubtreeIterator bblockSubtreeIterator()
BBlock
bblockSubtreeIterator in interface BBlockpublic BBlockNodeIterator bblockNodeIterator()
BBlock
bblockNodeIterator in interface BBlockpublic java.lang.String toString()
public java.lang.String toStringShort()
BBlock
toStringShort in interface BBlockpublic java.lang.String toStringDetail()
BBlock
toStringDetail in interface BBlockpublic void printSubtrees()
public void addToPredList(BBlock pPred)
addToPredList in interface BBlockpPred - basic block to be added to the predecessor list
of this basic block.public void addToSuccList(BBlock pSucc)
addToSuccList in interface BBlockpublic void deleteFromPredList(BBlock pPred)
deleteFromPredList in interface BBlockpPred - basic block to be deleted from the predecessor list
of this basic block.public void deleteFromSuccList(BBlock pSucc)
deleteFromSuccList in interface BBlockpublic boolean getFlag(int pFlagNumber)
BBlock
getFlag in interface BBlockpFlagNumber - flag identification number (see below).
public void setFlag(int pFlagNumber,
boolean pYesNo)
setFlag in interface BBlock
public void allocateSpaceForDataFlowAnalysis(int pPointCount,
int pDefCount,
int pExpCount)
allocateSpaceForDataFlowAnalysis in interface BBlockpublic boolean isDef(int pPos)
BBlock
isDef in interface BBlockpPos - position number attached to the definition node.
public boolean isKill(int pPos)
BBlock
isKill in interface BBlockpPos - position number attached to the definition node.
public boolean isReach(int pPos)
BBlock
isReach in interface BBlockpPos - position number attached to the definition node.
public boolean isDefined(Sym pSym)
BBlock
isDefined in interface BBlockpSym - symbol representing a variable or a register
or expression identifier.
public boolean isUsed(Sym pSym)
BBlock
isUsed in interface BBlockpSym - symbol representing a variable or a register
or expression identifier.
public boolean isExposed(Sym pSym)
BBlock
isExposed in interface BBlockpSym - symbol representing a variable or a register
or expression identifier.
public boolean isEGen(ExpId pExpId)
BBlock
isEGen in interface BBlockpExpId - expression identifier assigned to the
expression.
public boolean isEKill(ExpId pExpId)
BBlock
isEKill in interface BBlockpExpId - expression identifier assigned to the
expression.
public boolean isAvailIn(ExpId pExpId)
BBlock
isAvailIn in interface BBlockpExpId - expression identifier
representing an expression. ()
public boolean isAvailOut(ExpId pExpId)
BBlock
isAvailOut in interface BBlockpExpId - expression identifier
representing an expression. ()
public boolean isLiveIn(Sym pSym)
BBlock
isLiveIn in interface BBlockpSym - variable or register or expression identifier
representing an expression.
public boolean isLiveOut(Sym pSym)
BBlock
isLiveOut in interface BBlockpSym - variable or register or expression identifier
representing an expression.
public boolean isDefIn(Sym pSym)
BBlock
isDefIn in interface BBlockpSym - variable or register or expression identifier
representing an expression.
public boolean isDefOut(Sym pSym)
BBlock
isDefOut in interface BBlockpSym - variable or register or expression identifier
representing an expression.
protected boolean isSymExpOn(ExpVector pVector,
Sym pSym)
public DefVector getDef()
BBlock
getDef in interface BBlockpublic void setDef(DefVector pVect)
public DefVector getKill()
BBlock
getKill in interface BBlockpublic void setKill(DefVector pVect)
public DefVector getReach()
BBlock
getReach in interface BBlockpublic void setReach(DefVector pVect)
public FlowAnalSymVector getDefined()
BBlock
getDefined in interface BBlockpublic void setDefined(FlowAnalSymVector pVect)
public FlowAnalSymVector getUsed()
BBlock
getUsed in interface BBlockpublic void setUsed(FlowAnalSymVector pVect)
public FlowAnalSymVector getExposed()
BBlock
getExposed in interface BBlockpublic void setExposed(FlowAnalSymVector pVect)
public ExpVector getEGen()
BBlock
getEGen in interface BBlockpublic void setEGen(ExpVector pVect)
public ExpVector getEKill()
BBlock
getEKill in interface BBlockpublic ExpVector getEKillAll()
BBlock
getEKillAll in interface BBlockpublic void setEKill(ExpVector pVect)
public ExpVector getAvailIn()
BBlock
getAvailIn in interface BBlockpublic void setAvailIn(ExpVector pVect)
public ExpVector getAvailOut()
BBlock
getAvailOut in interface BBlockpublic void setAvailOut(ExpVector pVect)
public FlowAnalSymVector getLiveIn()
BBlock
getLiveIn in interface BBlockpublic void setLiveIn(FlowAnalSymVector pVect)
public FlowAnalSymVector getLiveOut()
BBlock
getLiveOut in interface BBlockpublic void setLiveOut(FlowAnalSymVector pVect)
public FlowAnalSymVector getDefIn()
BBlock
getDefIn in interface BBlockpublic void setDefIn(FlowAnalSymVector pVect)
public FlowAnalSymVector getDefOut()
BBlock
getDefOut in interface BBlockpublic void setDefOut(FlowAnalSymVector pVect)
public java.util.Set getDefNodes()
BBlock
getDefNodes in interface BBlockpublic void setDefNodes(java.util.Set pSet)
public SubpFlow getSubpFlow()
BBlock
getSubpFlow in interface BBlockpublic int getBBlockNumber()
getBBlockNumber in interface BBlockpublic void setAflowBBlock(BBlock pBBlock)
setAflowBBlock in interface BBlockpublic BBlock getAflowBBlock()
getAflowBBlock in interface BBlockpublic DefVector getReachVector()
public DefVector getDefVector()
public DefVector getKillVector()
public ExpVector getEGenVector()
public ExpVector getEKillVector()
public ExpVector getEKillAllVector()
public ExpVector getAvailInVector()
public ExpVector getAvailOutVector()
public FlowAnalSymVector getDefinedVector()
public FlowAnalSymVector getExposedVector()
public FlowAnalSymVector getLiveInVector()
public FlowAnalSymVector getLiveOutVector()
public FlowAnalSymVector getDefInVector()
public FlowAnalSymVector getDefOutVector()
public FlowAnalSymVector getUsedVector()
public void resetForDataFlowAnal()
public HIR controlTransfer()
BBlock
controlTransfer in interface BBlock
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||